/* =============================================
   FLUENK — Design System v1.0
   Teal × Light Canvas
   ============================================= */

:root {
  /* ---- Brand Core ---- */
  --neon-lime: #0D9488;
  --fluenk-accent: #06B6D4;
  --forest: #115E59;

  /* ---- Ranking Tiers ---- */
  --gold: #FFD233;
  --gold-glow: rgba(255, 210, 51, 0.25);
  --silver: #C8CDD6;
  --silver-glow: rgba(200, 205, 214, 0.18);
  --bronze: #D4B45A;
  --bronze-glow: rgba(212, 180, 90, 0.20);

  /* ---- Score Bands ---- */
  --band-elite: #22FF6E;
  --band-top: #A8F042;
  --band-good: #FFD233;
  --band-mid: #FF8C38;
  --band-low: #FF3A5C;

  /* ---- Semantic ---- */
  --clr-success: #15803D;
  --clr-warning: #B45309;
  --clr-danger: #B91C1C;
  --clr-info: #1D4ED8;

  /* ---- Layout ---- */
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --header-h: 60px;
  --max-w: 1200px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --glass-blur: blur(20px) saturate(1.8);
  --glass-bg: rgba(255, 255, 255, 0.72);
  --border-subtle: rgba(0, 0, 0, 0.04);

  /* ---- Light Theme (only) ---- */
  --bg: #F2F2F7;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-secondary: #FFFFFF;
  --bg-elevated: #F5F5F7;
  --text: #1C1C1E;
  --text-secondary: #0F766E;
  --text-primary: #0D9488;
  --text-muted: #115E59;
  --border: #D1D1D6;
  --border-light: #E5E5EA;
  --rank-default-fill: #E5E5EA;
  --rank-default-text: #8E8E93;

  --primary: #0D9488;
  --primary-hover: #0F766E;
  --primary-dark: #115E59;
  --primary-glow: rgba(13, 148, 136, 0.12);
  --primary-bg: rgba(13, 148, 136, 0.06);

  --shadow: 0 1px 2px rgba(0,0,0,0.04), 0 1px 4px rgba(0,0,0,0.02);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.03);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.04);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.04), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 8px 28px rgba(0,0,0,0.08), 0 0 0 1px rgba(13, 148, 136, 0.12);
  --header-bg: rgba(255, 255, 255, 0.78);
  --overlay-bg: rgba(0, 0, 0, 0.4);
}

/* ============ SKIN COLOR THEMES ============ */
[data-skin="#FFD700"] {
  --neon-lime: #D4A800;
  --fluenk-accent: #FFD700;
  --forest: #8B6914;
  --primary: #D4A800;
  --primary-hover: #B8920A;
  --primary-dark: #8B6914;
  --primary-glow: rgba(212, 168, 0, 0.12);
  --primary-bg: rgba(212, 168, 0, 0.06);
}
[data-skin="#FF6B9D"] {
  --neon-lime: #E0527E;
  --fluenk-accent: #FF6B9D;
  --forest: #99304A;
  --primary: #E0527E;
  --primary-hover: #C94570;
  --primary-dark: #99304A;
  --primary-glow: rgba(224, 82, 126, 0.12);
  --primary-bg: rgba(224, 82, 126, 0.06);
}
[data-skin="#00D4FF"] {
  --neon-lime: #00B4D8;
  --fluenk-accent: #00D4FF;
  --forest: #006A80;
  --primary: #00B4D8;
  --primary-hover: #009AB8;
  --primary-dark: #006A80;
  --primary-glow: rgba(0, 180, 216, 0.12);
  --primary-bg: rgba(0, 180, 216, 0.06);
}
[data-skin="#2ECC71"] {
  --neon-lime: #27AE60;
  --fluenk-accent: #2ECC71;
  --forest: #196F3D;
  --primary: #27AE60;
  --primary-hover: #219A52;
  --primary-dark: #196F3D;
  --primary-glow: rgba(39, 174, 96, 0.12);
  --primary-bg: rgba(39, 174, 96, 0.06);
}
[data-skin="#A855F7"] {
  --neon-lime: #9333EA;
  --fluenk-accent: #A855F7;
  --forest: #5B21B6;
  --primary: #9333EA;
  --primary-hover: #7E22CE;
  --primary-dark: #5B21B6;
  --primary-glow: rgba(147, 51, 234, 0.12);
  --primary-bg: rgba(147, 51, 234, 0.06);
}

/* ============ DARK THEME ============ */
[data-theme="dark"] {
  --bg: #0F0F11;
  --bg-surface: #1A1A1E;
  --bg-card: #1E1E22;
  --bg-secondary: #1A1A1E;
  --bg-elevated: #252529;
  --text: #E5E5EA;
  --text-secondary: #AEAEB2;
  --text-muted: #636366;
  --border: #38383A;
  --border-light: #2C2C2E;
  --border-subtle: rgba(255, 255, 255, 0.06);
  --rank-default-fill: #2C2C2E;
  --rank-default-text: #636366;
  --shadow: 0 1px 2px rgba(0,0,0,0.3), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4), 0 1px 4px rgba(0,0,0,0.2);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.5), 0 4px 12px rgba(0,0,0,0.3);
  --shadow-card: 0 1px 4px rgba(0,0,0,0.3), 0 0 0 1px var(--border-subtle);
  --shadow-card-hover: 0 8px 28px rgba(0,0,0,0.4), 0 0 0 1px rgba(13, 148, 136, 0.2);
  --header-bg: rgba(15, 15, 17, 0.85);
  --overlay-bg: rgba(0, 0, 0, 0.6);
  --glass-bg: rgba(26, 26, 30, 0.8);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ============ DISPLAY FONT (Ubuntu) — titoli, badge, score ============ */
.logo-f, .logo-rest, .loader-letter,
.ranking-hero h1, .page-header h1, .dashboard-header h1,
.compare-header h1, .stats-header h1, .info-card h2, .admin-section h3,
.rank-badge, .rank-card-name, .rank-card-score,
.popup-name, .popup-metric-value, .modal h2,
.dash-card-name, .profile-name, .profile-metric-value, .profile-section-title,
.compare-card-name, .stat-card-value, .stats-section-title,
.notif-dropdown-header, .mobile-nav-title,
.history-table th {
  font-family: var(--font-display);
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  transition: background var(--transition-smooth), color var(--transition-smooth);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.55;
  letter-spacing: -0.01em;
  font-size: 14px;
}

/* ============ HEADER ============ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  z-index: 100;
}

.header-glow {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 100%;
  background: var(--header-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid var(--border-subtle);
}

.header-glow::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 5%, var(--primary) 35%, var(--fluenk-accent) 65%, transparent 95%);
  opacity: 0.3;
}

.header-inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  max-width: 1400px;
  margin: 0 auto;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.header-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

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

.header-divider {
  width: 1px;
  height: 18px;
  background: linear-gradient(180deg, transparent, var(--primary), transparent);
  opacity: 0.25;
}

.header-tagline {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ============ LOGO ============ */
.logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  user-select: none;
}

.logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: logoPulse 3s ease-in-out infinite;
  filter: drop-shadow(0 0 6px rgba(13, 148, 136, 0.4));
}

@keyframes logoPulse {
  0%, 100% { filter: drop-shadow(0 0 6px rgba(13, 148, 136, 0.4)); }
  50% { filter: drop-shadow(0 0 12px rgba(13, 148, 136, 0.7)); }
}

.logo-text {
  display: flex;
  align-items: baseline;
  gap: 1px;
}

.logo-f {
  font-size: 26px;
  font-weight: 900;
  color: var(--neon-lime);
  line-height: 1;
  text-shadow: 0 0 20px rgba(13, 148, 136, 0.3);
}

.logo-rest {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.logo-badge {
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: var(--neon-lime);
  border: 1px solid rgba(13, 148, 136, 0.3);
  background: rgba(13, 148, 136, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1;
  margin-top: -8px;
}

.logo-f.big { font-size: 56px; }
.logo-rest.big { font-size: 44px; }

.modal-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-logo-img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  filter: drop-shadow(0 0 10px rgba(13, 148, 136, 0.5));
  animation: logoPulse 3s ease-in-out infinite;
}

/* ============ NAVIGATION ============ */
.header-nav {
  display: flex;
  gap: 2px;
  position: relative;
  background: var(--bg-surface);
  border-radius: 50px;
  padding: 3px 4px;
  border: 1px solid var(--border-subtle);
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  max-width: 720px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
}
.header-nav::-webkit-scrollbar { display: none; }

.nav-btn {
  padding: 7px 13px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
  z-index: 1;
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-btn svg {
  opacity: 0.45;
  transition: opacity var(--transition-fast);
  flex-shrink: 0;
}

.nav-btn:hover {
  color: var(--text-secondary);
  background: var(--primary-bg);
}

.nav-btn:hover svg {
  opacity: 0.7;
}

.nav-btn.active {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 2px 10px rgba(13, 148, 136, 0.35), inset 0 1px 0 rgba(255,255,255,0.1);
}

.nav-btn.active svg {
  opacity: 1;
}

/* ============ USER/ADMIN PILL ============ */
.admin-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px 5px 9px;
  background: rgba(13, 148, 136, 0.06);
  border: 1px solid rgba(13, 148, 136, 0.15);
  border-radius: 50px;
  margin-right: 2px;
  transition: all 0.2s ease;
}

.admin-pill:hover {
  background: rgba(13, 148, 136, 0.1);
}

.admin-pill.admin-pill-style {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.12), rgba(6, 182, 212, 0.08));
  border-color: rgba(13, 148, 136, 0.3);
  box-shadow: 0 0 12px rgba(13, 148, 136, 0.08);
}

.admin-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(13, 148, 136, 0.5);
  animation: adminDotPulse 2.5s ease-in-out infinite;
}

.admin-dot.admin-dot-style {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.7);
}

@keyframes adminDotPulse {
  0%, 100% { box-shadow: 0 0 3px rgba(13, 148, 136, 0.3); }
  50% { box-shadow: 0 0 8px rgba(13, 148, 136, 0.7); }
}

.admin-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--primary);
}

/* ============ BUTTONS ============ */
.btn-icon {
  width: 34px; height: 34px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-xs);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-fast);
  position: relative;
}

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

.btn-icon:active {
  transform: scale(0.9);
}

.btn-login {
  padding: 7px 20px;
  border: 1.5px solid var(--primary);
  background: transparent;
  color: var(--primary);
  border-radius: 50px;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font);
}

.btn-login:hover {
  background: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.3);
  transform: translateY(-1px);
}

.btn-primary {
  padding: 11px 24px;
  border: none;
  background: var(--neon-lime);
  color: #FFFFFF;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font);
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.2);
}

.btn-primary:hover {
  background: var(--fluenk-accent);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13, 148, 136, 0.35);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(13, 148, 136, 0.2);
}

.btn-primary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary.full { width: 100%; justify-content: center; }

.btn-secondary {
  padding: 11px 24px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font);
}

.btn-secondary:hover {
  border-color: var(--neon-lime);
  color: var(--neon-lime);
  background: var(--primary-bg);
}

.btn-danger {
  padding: 7px 16px;
  border: none;
  background: var(--band-low);
  color: white;
  border-radius: var(--radius-xs);
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: var(--font);
}

.btn-danger:hover {
  background: #E02040;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.admin-bar {
  display: none;
}

/* ============ MAIN ============ */
.main {
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h));
}

.page { animation: fadeIn 0.35s ease; }

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

/* ============ RANKING HERO ============ */
.ranking-hero {
  text-align: center;
  padding: 48px 24px 20px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.ranking-hero h1 {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.ranking-hero h1 span {
  color: var(--neon-lime);
}

.ranking-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 400;
  margin-bottom: 8px;
}

.refresh-info {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ LOADER ============ */
.loader-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px;
  gap: 24px;
}

.fluenk-loader {
  width: 100px;
  height: 100px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-ring {
  position: absolute;
  border: 3px solid transparent;
  border-radius: 50%;
  animation: loaderSpin 1.4s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
}

.loader-ring:nth-child(1) {
  width: 100%; height: 100%;
  border-top-color: var(--neon-lime);
}

.loader-ring:nth-child(2) {
  width: 75%; height: 75%;
  border-right-color: var(--fluenk-accent);
  animation-delay: 0.15s;
  animation-direction: reverse;
}

.loader-ring:nth-child(3) {
  width: 50%; height: 50%;
  border-bottom-color: var(--forest);
  animation-delay: 0.3s;
}

.loader-letter {
  font-size: 28px;
  font-weight: 900;
  color: var(--neon-lime);
  animation: loaderPulse 1.4s ease-in-out infinite;
  z-index: 1;
}

@keyframes loaderSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes loaderPulse {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}

.loader-text {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  animation: loaderTextFade 2s ease-in-out infinite;
}

@keyframes loaderTextFade {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.loader-progress {
  width: 260px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--neon-lime), var(--forest));
  border-radius: 3px;
  width: 0%;
  transition: width 0.5s ease;
}

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

/* ============ REFRESH OVERLAY ============ */
.refresh-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--overlay-bg);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: overlayFadeIn 0.3s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.refresh-overlay-content {
  background: var(--bg-card);
  border-radius: 20px;
  padding: 48px 40px 36px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 320px;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
}

.refresh-overlay-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 8px 0 0;
}

.refresh-overlay-username {
  font-size: 14px;
  font-weight: 600;
  color: var(--neon-lime);
}

.refresh-overlay-progress {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.refresh-overlay-progress .progress-bar { width: 100%; height: 8px; }
.refresh-overlay-progress .progress-label { font-size: 13px; }

.btn-abort-refresh {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 20px;
  border: 1.5px solid var(--danger, #ef4444);
  border-radius: 10px;
  background: transparent;
  color: var(--danger, #ef4444);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.btn-abort-refresh:hover:not(:disabled) {
  background: var(--danger, #ef4444);
  color: #fff;
}
.btn-abort-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============ RANKING GRID ============ */
.ranking-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 24px 80px;
  overflow-x: hidden;
}

.ranking-list {
  display: grid;
  padding-top: 20px !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  width: 100%;
}

/* ============ RANK CARD ============ */
.rank-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  position: relative;
  transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
  border: 1px solid var(--border-subtle);
  cursor: default;
  min-width: 0;
  overflow: visible;
}

.rank-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: var(--shadow-card-hover);
}

/* Top 3 glow effects */
.rank-card.top-1 {
  border-color: rgba(255, 210, 51, 0.3);
  box-shadow: var(--shadow-card), 0 0 24px var(--gold-glow);
}
.rank-card.top-1:hover { box-shadow: var(--shadow-md), 0 0 32px var(--gold-glow); }

.rank-card.top-2 {
  border-color: rgba(200, 205, 214, 0.3);
  box-shadow: var(--shadow-card), 0 0 24px var(--silver-glow);
}
.rank-card.top-2:hover { box-shadow: var(--shadow-md), 0 0 32px var(--silver-glow); }

.rank-card.top-3 {
  border-color: rgba(212, 180, 90, 0.3);
  box-shadow: var(--shadow-card), 0 0 24px var(--bronze-glow);
}
.rank-card.top-3:hover { box-shadow: var(--shadow-md), 0 0 32px var(--bronze-glow); }

/* ============ RANK CARD TOP BAR ============ */
.rank-card-topbar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-bottom: 12px;
}
.rank-topbar-spacer { flex: 1; }

/* ============ RANK BADGE ============ */
.rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--forest);
  color: white;
  flex-shrink: 0;
}

/* ============ RANK TREND (position variation) ============ */
.rank-trend {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 6px;
  flex-shrink: 0;
}
.rank-trend.up {
  color: #16a34a;
  background: rgba(22,163,74,.10);
}
.rank-trend.down {
  color: #ef4444;
  background: rgba(239,68,68,.10);
}
.rank-trend.neutral {
  color: var(--text-muted);
  background: transparent;
  opacity: .5;
}
.rank-trend-arrow { font-size: 9px; }
.rank-trend-val { font-size: 11px; }

.rank-card.top-1 .rank-badge { background: var(--gold); color: #0D0D0D; }
.rank-card.top-2 .rank-badge { background: var(--silver); color: #0D0D0D; }
.rank-card.top-3 .rank-badge { background: var(--bronze); color: #0D0D0D; }

/* ============ AVATAR WITH RING ============ */
.rank-avatar-wrap {
  position: relative;
  width: 80px;
  height: 80px;
  flex-shrink: 0;
}

.rank-avatar-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px dashed var(--border);
  pointer-events: none;
}

.rank-card.top-1 .rank-avatar-ring {
  border-color: var(--gold);
  border-style: solid;
  border-width: 2.5px;
}

.rank-card.top-2 .rank-avatar-ring {
  border-color: var(--silver);
  border-style: solid;
  border-width: 2.5px;
}

.rank-card.top-3 .rank-avatar-ring {
  border-color: var(--bronze);
  border-style: solid;
  border-width: 2.5px;
}

.rank-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
}

/* ============ CARD CONTENT ============ */
.rank-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  max-width: 100%;
  line-height: 1.2;
  padding: 0 28px;
  letter-spacing: -0.2px;
}
.rank-card-name .rank-card-name-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
/* Verified badge — top-right of avatar */
.verified-badge {
  position: absolute;
  top: 0;
  right: -2px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary, #6366f1);
  color: #fff;
  border-radius: 50%;
  z-index: 3;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
  border: 2px solid var(--bg-card);
}
.verified-badge svg {
  width: 13px;
  height: 13px;
}

/* Profile verified badge — inline */
.profile-name .verified-badge,
.admin-card-name .verified-badge {
  position: static;
  display: inline-flex;
  width: 20px;
  height: 20px;
  vertical-align: middle;
  margin-left: 6px;
}
.profile-name .verified-badge svg,
.admin-card-name .verified-badge svg {
  width: 12px;
  height: 12px;
}

.rank-card-handle {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: -4px;
}

/* Category tags on rank cards */
.rank-card-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
  margin-top: 2px;
  padding: 0 8px;
}
.category-tag-sm {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--primary);
  background: rgba(13, 148, 136, 0.10);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 20px;
  white-space: nowrap;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Category tags on profile page */
.profile-categories {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.category-tag {
  display: inline-block;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--primary);
  background: rgba(13, 148, 136, 0.10);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 20px;
  white-space: nowrap;
}

/* Rank card footer button */
.rank-card-footer {
  margin-top: auto;
  padding-top: 4px;
}
.rank-card-footer .btn {
  padding: 8px 22px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--primary, #6366f1);
  border: none;
  border-radius: 30px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  letter-spacing: .02em;
}
.rank-card-footer .btn:hover {
  background: rgba(11, 126, 116, 1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}

.rank-card-bio {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.5;
  max-height: 3em;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  padding: 0 8px;
  word-break: break-word;
  width: 100%;
}

/* ============ PLATFORM PILLS ============ */
.rank-card-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
  margin-top: 4px;
}

.platform-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 11px;
  font-weight: 700;
  color: white;
  line-height: 1;
  letter-spacing: 0.2px;
}

.platform-pill.instagram { background: linear-gradient(135deg, #F7274E, #9B27AF); }
.platform-pill.youtube { background: #FF0033; }
.platform-pill.tiktok { background: #010101; border: 1px solid #69C9D0; }
.platform-pill.x { background: #1D9BF0; }
.platform-pill.facebook { background: #0866FF; }
.platform-pill.twitch { background: #9146FF; }
.platform-pill.linkedin { background: #0A66C2; }
.platform-pill.threads { background: #000000; border: 1px solid #666; }
.platform-pill.threads { background: #000000; }
.platform-pill.tiktok { border-color: transparent; }
.platform-pill.threads { border-color: transparent; }

/* ============ METRICS ROW ============ */
.rank-card-metrics {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: auto;
  width: 100%;
}

/* ============ SCORE PILL ============ */
.rank-card-score {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #FFFFFF;
  box-shadow: 0 3px 12px rgba(13, 148, 136, 0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

.rank-card-score .score-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.8;
}

/* ============ ER PILL ============ */
.rank-card-er {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 14px;
  background: var(--bg-surface);
  color: var(--text);
  border: 1px solid var(--border-subtle);
}

.rank-card-er .er-value {
  color: var(--primary);
}

.rank-card-er .er-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  opacity: 0.5;
}

/* Score Band Colors */
[data-band="elite"] .rank-card-score { background: linear-gradient(135deg, #22FF6E, #15B84C); color: #0D0D0D; box-shadow: 0 2px 12px rgba(34,255,110,0.2); }
[data-band="top"] .rank-card-score { background: linear-gradient(135deg, #A8F042, #7CC02E); color: #0D0D0D; box-shadow: 0 2px 12px rgba(168,240,66,0.2); }
[data-band="good"] .rank-card-score { background: linear-gradient(135deg, #FFD233, #E6B800); color: #0D0D0D; box-shadow: 0 2px 12px rgba(255,210,51,0.2); }
[data-band="mid"] .rank-card-score { background: linear-gradient(135deg, #FF8C38, #E67020); color: #0D0D0D; box-shadow: 0 2px 12px rgba(255,140,56,0.2); }
[data-band="low"] .rank-card-score { background: linear-gradient(135deg, #FF3A5C, #D42040); color: #FFFFFF; box-shadow: 0 2px 12px rgba(255,58,92,0.2); }

/* ============ EMPTY STATE ============ */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

.empty-state svg { margin-bottom: 16px; opacity: 0.3; }

.empty-state p {
  font-size: 15px;
  font-weight: 500;
}

/* ============ DEFAULT AVATAR ============ */
.default-avatar {
  background: linear-gradient(135deg, var(--neon-lime), var(--forest));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0D0D0D;
  font-weight: 800;
  font-size: 24px;
  border-radius: 50%;
}

/* Platform-specific avatar placeholders */
.default-avatar.platform-avatar { color: #fff; }
.default-avatar.platform-avatar--instagram { background: linear-gradient(135deg, #833ab4 0%, #fd1d1d 50%, #fcb045 100%); }
.default-avatar.platform-avatar--tiktok    { background: #010101; }
.default-avatar.platform-avatar--youtube   { background: #FF0000; }
.default-avatar.platform-avatar--x         { background: #000; }
.default-avatar.platform-avatar--facebook  { background: #1877F2; }
.default-avatar.platform-avatar--twitch    { background: #9146FF; }
.default-avatar.platform-avatar--linkedin  { background: #0A66C2; }
.default-avatar.platform-avatar--threads   { background: #000; }
.platform-avatar-icon {
  width: 48%;
  height: 48%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.platform-avatar-icon svg {
  width: 100% !important;
  height: 100% !important;
}

/* ============ INFO PAGE ============ */
/* ============ INFO PAGE (Tabbed) ============ */
.info-hero {
  text-align: center;
  padding: 30px 16px 0;
  max-width: var(--max-w);
  margin: 0 auto;
}
.info-hero .info-logo { margin-bottom: 8px; }
.info-hero-sub {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.info-tabs {
  display: flex;
  gap: 4px;
  max-width: var(--max-w);
  margin: 0 auto 24px;
  padding: 0 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  overflow-x: auto;
}
.info-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: var(--radius-xs);
  white-space: nowrap;
}
.info-tab.active {
  background: var(--neon-lime);
  color: #fff;
}
.info-tab:hover:not(.active) { color: var(--text); }
.info-tab svg { flex-shrink: 0; }

.info-panel {
  display: none;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  animation: infoFadeIn 0.25s ease;
}
.info-panel.active { display: block; }
@keyframes infoFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.info-card {
  max-width: 620px;
  margin: 0 auto 30px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  text-align: left;
  border: 1px solid var(--border-light);
}

.info-logo { margin-bottom: 24px; }

.info-card h2 {
  margin-bottom: 12px;
  font-size: 20px;
  text-align: center;
}

.info-card > p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 14px;
  font-size: 14px;
}

/* Info sections (score tab) */
.info-section {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 16px 0;
  border-left: 3px solid var(--primary);
}
.info-section--formula {
  border-left-color: var(--neon-lime);
  text-align: center;
}
.info-section-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.info-section-icon {
  font-size: 18px;
}
.info-section-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 10px;
  font-weight: 500;
}
.info-section p, .info-card .info-section p {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0 0 8px;
}
.info-section ul {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.info-section li {
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.65;
}
.info-section li:last-child { border-bottom: none; padding-bottom: 0; }
.info-section code {
  font-size: 12px;
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Courier New', monospace;
}
.info-note {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 6px 0 0;
}

/* Weight / Reach grid */
.info-weight-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}
.info-weight-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-xs);
  padding: 10px 6px;
  gap: 2px;
}
.info-weight-name {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 600;
}
.info-weight-val {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
}
.info-weight-mau {
  font-size: 11px;
  color: var(--text-muted);
}

/* Presence row */
.info-presence-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
}
.info-presence-item {
  background: var(--bg-elevated);
  padding: 6px 12px;
  border-radius: 50px;
  font-size: 12px;
  color: var(--text-secondary);
}

/* Gamification feature grid */
.info-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 16px;
}
.info-feature-card {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 18px 16px;
  text-align: center;
  border: 1px solid var(--border-light);
  transition: transform 0.15s, box-shadow 0.15s;
}
.info-feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.info-feature-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.info-feature-card h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.info-feature-card p {
  font-size: 12.5px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Account cards */
.info-account-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}
.info-account-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  border-left: 3px solid var(--text-muted);
}
.info-account-card--creator { border-left-color: var(--primary); }
.info-account-card--brand   { border-left-color: #8B5CF6; }
.info-account-card--admin { border-left-color: #F59E0B; }
.info-account-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
}
.info-account-body h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.info-account-body p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
  margin: 0;
}

/* Events hero */
.info-events-hero {
  text-align: center;
  padding: 30px 20px;
  margin: 16px 0;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--primary);
}
.info-events-hero svg { margin-bottom: 12px; }
.info-events-hero p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

.info-footer {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 20px;
  text-align: center;
}

.score-formula {
  background: var(--primary-bg);
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--neon-lime);
  font-family: 'Courier New', monospace;
  font-size: 13px;
  border: 1px solid rgba(13, 148, 136, 0.15);
  word-break: break-word;
}

.score-bands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 0;
}
.score-band-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 700;
  color: #0D0D0D;
}
.score-band-item.elite { background: var(--band-elite); }
.score-band-item.top { background: var(--band-top); }
.score-band-item.good { background: var(--band-good); }
.score-band-item.mid { background: var(--band-mid); }
.score-band-item.low { background: var(--band-low); color: #FFFFFF; }

/* ============ ADMIN PAGE ============ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding: 28px 16px 0;
}

.page-header h1 {
  font-size: 24px;
  font-weight: 800;
}

.admin-section {
  max-width: var(--max-w);
  margin: 0 auto 20px;
  padding: 0 16px;
}

.admin-section h3 {
  font-size: 16px;
  margin-bottom: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ---- Collapsible admin section ---- */
.admin-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding-left: 20px;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-bottom: 20px !important;
  margin: 0 -14px 0;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.admin-section-toggle:hover { background: var(--bg-elevated); }
.admin-section-toggle h3 { margin-bottom: 0; padding-left: 20px; }
.admin-section-chevron {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  transition: transform 0.25s ease;
  flex-shrink: 0;
}
.admin-section-toggle.collapsed .admin-section-chevron { transform: rotate(-90deg); }
.admin-section-body {
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.25s ease;
  max-height: 9999px;
  opacity: 1;
}
.admin-section-body.collapsed {
  max-height: 0;
  opacity: 0;
}

/* ============ APIFY MONITOR ============ */
.apify-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.apify-card {
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 12px;
padding: 14px 16px;
}
.apify-card-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
}
.apify-card-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.apify-card-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}
.apify-bar-wrap {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}
.apify-bar {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.5s ease;
}
.apify-bar-mid { background: #f0a500; }
.apify-bar-warn { background: #e74c3c; }

/* ============ ADMIN ACTION BUTTONS BAR ============ */
.admin-actions-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px !important;
}

.btn-admin-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
  white-space: nowrap;
  text-align: center;
  min-height: 50px;
}

.btn-admin-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(99,102,241,.12);
  transform: translateY(-1px);
}

.btn-admin-action--ai {
  border-color: #a855f7;
  color: #a855f7;
}
.btn-admin-action--ai:hover {
  border-color: #c084fc;
  color: #c084fc;
  box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
  transform: translateY(-1px);
}
.btn-admin-action--ai:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}
.btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .admin-actions-bar { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .admin-actions-bar { grid-template-columns: repeat(2, 1fr); }
  .btn-admin-action { font-size: 12px; padding: 12px 8px; }
}

/* ============ ADMIN HERO HEADER ============ */
.admin-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 24px 0 20px;
  margin-bottom: 0;
}
.admin-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.admin-hero-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.admin-hero-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px var(--primary-glow);
}
.admin-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0;
  font-family: var(--font-display);
}
.admin-hero-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* ============ ADMIN TAB NAVIGATION ============ */
.admin-tab-nav-wrap {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
  padding: 0;
  position: sticky;
  top: var(--header-h);
  z-index: 40;
  box-shadow: 0 1px 0 var(--border-light);
}
.admin-tab-nav {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.admin-tab-nav::-webkit-scrollbar { display: none; }
.admin-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 14px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  outline: none;
  position: relative;
  top: 1px;
}
.admin-tab:hover { color: var(--text); }
.admin-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ============ ADMIN TAB PANELS ============ */
.admin-tab-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 40px;
}
.admin-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.admin-section-heading {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 20px;
  font-family: var(--font-display);
}
.admin-section-subheading {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.admin-hint-text {
  font-size: 13px;
  color: var(--text-muted);
  margin: 6px 0 0;
  line-height: 1.5;
}
.admin-modal-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: -4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ============ ADMIN KPI CARDS ============ */
.admin-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}
.admin-kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--transition-fast);
}
.admin-kpi-card:hover { box-shadow: var(--shadow-md); }
.admin-kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.admin-kpi-icon--primary { background: var(--primary-bg); color: var(--primary); }
.admin-kpi-icon--success { background: rgba(21,128,61,0.1); color: var(--clr-success); }
.admin-kpi-icon--teal { background: rgba(13,148,136,0.1); color: var(--primary); }
.admin-kpi-icon--purple { background: rgba(139,92,246,0.1); color: #8B5CF6; }
.admin-kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  font-family: var(--font-display);
}
.admin-kpi-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 3px;
}
@media (max-width: 800px) {
  .admin-kpi-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .admin-kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-kpi-value { font-size: 22px; }
}

/* ============ ADMIN QUICK ACTIONS ============ */
.admin-qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.admin-qa-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 18px;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: var(--shadow-card);
}
.admin-qa-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
}
.admin-qa-card--ai {
  border-color: rgba(168,85,247,0.3);
  background: rgba(168,85,247,0.04);
}
.admin-qa-card--ai:hover {
  border-color: #a855f7;
  box-shadow: 0 4px 16px rgba(168,85,247,0.15);
}
.admin-qa-icon-wrap {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 12px;
  flex-shrink: 0;
}
.admin-qa-info { flex: 1; min-width: 0; }
.admin-qa-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 2px;
}
.admin-qa-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}
.admin-qa-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: 0.5;
  transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.admin-qa-card:hover .admin-qa-arrow {
  opacity: 1;
  transform: translateX(3px);
  color: var(--primary);
}
@media (max-width: 700px) {
  .admin-qa-grid { grid-template-columns: 1fr; }
}

/* ============ ADMIN EVENTS TAB ============ */
#admin-events-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ============ ADMIN USERS TAB ============ */
.admin-users-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}
.admin-users-col {
  min-width: 0;
}
.admin-credits-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-credits-card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
@media (max-width: 768px) {
  .admin-users-grid { grid-template-columns: 1fr; }
}

/* ============ ADMIN SYSTEM TAB ============ */
.admin-system-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 28px;
}
.admin-system-col {
  min-width: 0;
}
.admin-system-col h2 {
  margin-bottom: 16px;
}
.admin-ai-tool-section {
  margin-top: 4px;
}
.admin-ai-tool-card {
  display: flex;
  align-items: center;
  gap: 18px;
  background: linear-gradient(135deg, rgba(168,85,247,0.06), rgba(139,92,246,0.04));
  border: 1px solid rgba(168,85,247,0.2);
  border-radius: var(--radius);
  padding: 20px 24px;
}
.admin-ai-tool-icon {
  font-size: 36px;
  flex-shrink: 0;
}
.admin-ai-tool-info {
  flex: 1;
  min-width: 0;
}
.admin-ai-tool-info h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
}
.admin-ai-tool-info p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}
@media (max-width: 768px) {
  .admin-system-grid { grid-template-columns: 1fr; }
  .admin-ai-tool-card { flex-direction: column; align-items: flex-start; }
}

/* ============ ADMIN CREDITS (in modal) ============ */
.admin-credits-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.admin-credits-field label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.add-form-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Password input with toggle/generate buttons */
.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.password-input-wrap .input {
  width: 100%;
  padding-right: 80px;
}
.pw-toggle-btn,
.pw-generate-btn {
  position: absolute;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}
.pw-toggle-btn:hover,
.pw-generate-btn:hover {
  color: var(--primary);
  background: var(--bg-subtle);
}
.pw-toggle-btn { right: 40px; }
.pw-generate-btn { right: 8px; }

/* ============ FORMS ============ */
.input {
  flex: 1;
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.input:focus {
  border-color: var(--neon-lime);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.input::placeholder { color: var(--text-muted); }

.textarea { resize: vertical; }

/* ============ ADMIN CARDS ============ */
.admin-filters {
  margin-bottom: 16px;
}
.admin-filters .filters-row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-filters .search-box {
  flex: 1;
  min-width: 150px;
  max-width: 230px;
}
.admin-filters .platform-tabs,
.admin-filters .category-tabs {
  margin-top: 10px;
}
.admin-filters .advanced-filters {
  margin-top: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  margin-bottom: 0;
}
.admin-filters .advanced-filters .adv-filter-row {
  width: auto;
}
.admin-filters .btn-toggle-adv-filters {
  margin-top: 10px;
}
.admin-filter-count {
  font-size: 0.78rem;
  color: var(--primary);
  font-weight: 600;
  padding: 6px 0 2px;
}
@media (max-width: 640px) {
  .admin-filters .filters-row { flex-direction: column; }
  .admin-filters .search-box { min-width: 100%; }
  .admin-filters .filter-group { width: 100%; }
  .admin-filters .filter-select { flex: 1; }
}

.admin-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.admin-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  border: 1px solid var(--border-light);
}

.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.admin-card-header:hover {
  background: var(--bg-hover, rgba(0,0,0,0.03));
}

.admin-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.admin-card-chevron {
  transition: transform 0.3s ease;
  color: var(--text-muted);
  flex-shrink: 0;
}

.admin-card.collapsed .admin-card-chevron {
  transform: rotate(-90deg);
}

.admin-card-body {
  overflow: hidden;
  transition: max-height 0.35s ease, opacity 0.25s ease;
  max-height: 1500px;
  opacity: 1;
  border-top: 1px solid var(--border-light);
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.admin-card.collapsed .admin-card-body {
  max-height: 0;
  opacity: 0;
  border-top-color: transparent;
  padding: 0 20px;
}

/* Admin card edit fields */
.admin-card-name-edit,
.admin-card-bio-edit {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-field-label {
  font-size: 0.85em;
  font-weight: 600;
  color: var(--text-muted);
}
.admin-field-row {
  display: flex;
  gap: 10px;
  align-items: center;
}
.admin-card-bio-edit textarea {
  width: 100%;
}
.admin-field-hint {
  font-size: 0.8em;
  color: var(--text-muted);
}

.admin-card-avatar-wrap {
  flex-shrink: 0;
  width: 70px;
  height: 70px;
  position: relative;
}

.admin-card-avatar {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: var(--border-light) 3px solid;
  box-shadow: var(--shadow);
  object-fit: cover;
  display: block;
}

.admin-card-avatar-fallback {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: var(--border-light) 3px solid;
  box-shadow: var(--shadow);
  background: var(--accent, #8B5CF6);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--primary);
}

.admin-card-bio {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  padding: 20px 30px 10px;
  line-height: 1.4;
  min-height: 4em;
  max-height: 7em;
  overflow-x: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}

.admin-card-meta {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
  font-weight: 500;
}

.admin-card-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.admin-bonus-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.admin-platforms {
  padding: 12px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.admin-platform-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  font-size: 13px;
}

.platform-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  color: white;
}

.platform-dot.instagram { background: linear-gradient(135deg, #F7274E, #9B27AF); }
.platform-dot.youtube { background: #FF0033; }
.platform-dot.tiktok { background: #010101; }
.platform-dot.x { background: #1D9BF0; }
.platform-dot.facebook { background: #0866FF; }
.platform-dot.twitch { background: #9146FF; }
.platform-dot.linkedin { background: #0A66C2; }
.platform-dot.threads { background: #000000; }
.platform-dot.tiktok { border: 1px solid #ddd; }
.platform-dot.threads { border: 1px solid #ddd; }

.admin-platform-handle {
  font-weight: 600;
  white-space: nowrap;
  color: var(--text);
}
a.admin-platform-handle {
  color: var(--accent);
  text-decoration: none;
  transition: opacity 0.15s;
}
a.admin-platform-handle:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.admin-platform-stats {
  color: var(--text-muted);
  font-size: 12px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-add-platform-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--primary-bg);
  border-radius: var(--radius-sm);
  border: 1px dashed rgba(13, 148, 136, 0.3);
}

/* Admin categories */
.admin-categories {
  padding: 12px 20px 16px;
}
.admin-cats-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.admin-cats-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}
.admin-cat-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  user-select: none;
}
.admin-cat-label:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.admin-cat-label input[type="checkbox"] {
  accent-color: var(--primary);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}
.admin-cat-label:has(input:checked) {
  background: rgba(13, 148, 136, 0.12);
  border-color: var(--primary);
  color: var(--primary);
  font-weight: 600;
}

/* ============ VERIFICATION REQUESTS ============ */
.vr-toolbar {
  margin-bottom: 14px;
}
.vr-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.vr-filter-btn {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.vr-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.vr-filter-btn.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.verification-request-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  transition: border-color .15s;
}
.verification-request-item:hover { border-color: rgba(255,255,255,.12); }
.verification-request-item.pending { border-left: 3px solid #f59e0b; }
.verification-request-item.approved { border-left: 3px solid #22c55e; }
.verification-request-item.rejected { border-left: 3px solid #ef4444; }
.vr-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}
.vr-user {
  font-weight: 700;
  color: var(--text);
}
.vr-arrow {
  color: var(--text-muted);
  font-size: 12px;
}
.vr-influencer {
  font-weight: 600;
  color: var(--accent);
}
.vr-date {
  font-size: 12px;
  color: var(--text-muted);
}
.vr-status {
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 12px;
}
.vr-status-pending { background: rgba(245,158,11,.12); color: #f59e0b; }
.vr-status-approved { background: rgba(34,197,94,.12); color: #22c55e; }
.vr-status-rejected { background: rgba(239,68,68,.12); color: #ef4444; }
.vr-proof {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  word-break: break-all;
}
.vr-proof strong { color: var(--text); }
.vr-admin-note {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}
.vr-admin-note strong { color: var(--text); font-style: normal; }
.vr-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.btn-vr-approve,
.btn-vr-reject {
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-vr-approve {
  background: #22c55e;
  color: #fff;
}
.btn-vr-reject {
  background: rgba(239,68,68,.15);
  color: #ef4444;
}
.btn-vr-approve:hover,
.btn-vr-reject:hover { opacity: .8; }

@media (max-width: 640px) {
  .vr-info { gap: 4px; font-size: 12px; }
  .vr-actions { flex-direction: column; }
}

/* Admin small inputs */
.input-sm {
  padding: 6px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
  outline: none;
  min-width: 0;
}

.input-sm:focus { border-color: var(--neon-lime); }
.input-sm::placeholder { color: var(--text-muted); }

select.input-sm { min-width: 130px; }
.input-sm[type="number"] { width: 90px; }
.input-sm[type="text"] { flex: 1; }

.followers-input {
  width: 90px;
  padding: 5px 8px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 12px;
  font-family: var(--font);
  text-align: center;
  outline: none;
}

.followers-input:focus { border-color: var(--neon-lime); }

.bonus-input {
  width: 70px;
  padding: 6px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-surface);
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  font-family: var(--font);
  outline: none;
}

.bonus-input:focus { border-color: var(--neon-lime); }

.btn-save-bonus {
  padding: 6px 12px;
  border: none;
  background: var(--neon-lime);
  color: #0D0D0D;
  border-radius: var(--radius-xs);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s ease;
}

.btn-save-bonus:hover { background: var(--fluenk-accent); }

.btn-sm {
  padding: 5px 10px;
  border: 2px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-card);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-sm:hover { border-color: var(--neon-lime); color: var(--neon-lime); }

.btn-primary-sm {
  padding: 8px 12px;
  margin-top: 15px !important;
  margin-bottom: 10px !important;
  border: none;
  border-radius: var(--radius-xs);
  background: var(--neon-lime);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.2s ease;
}

.btn-primary-sm:hover { background: var(--fluenk-accent); color: white; }

.btn-x {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.btn-x:hover {
  background: rgba(255, 58, 92, 0.15);
  color: var(--band-low);
}

/* ============ MODAL ============ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  backdrop-filter: blur(12px) saturate(1.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  animation: fadeIn 0.25s ease;
}

.modal {
  background: var(--bg-card);
  border-radius: 22px;
  padding: 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  position: relative;
  border: 1px solid var(--border-subtle);
}

.modal h2 {
  margin-bottom: 20px;
  text-align: center;
  color: var(--text);
}

.modal .input {
  margin-bottom: 12px;
  width: 100%;
}

.modal-close {
  position: absolute;
  top: 12px; right: 16px;
  background: none; border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
  z-index: 10;
}

.modal-close:hover { color: var(--text); }

.login-error {
  color: var(--band-low);
  font-size: 13px;
  text-align: center;
  margin-top: 10px;
  min-height: 20px;
}

/* ============ INFLUENCER POPUP ============ */
.popup-content {
  overflow-y: auto;
  max-height: 85vh;
}

.popup-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 28px 20px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  position: relative;
}

.popup-header .fav-btn {
  position: static;
  opacity: 1;
  flex-shrink: 0;
}

.popup-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--neon-lime);
}

.popup-avatar.default-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  font-weight: 800;
  background: var(--bg-elevated);
  color: var(--neon-lime);
  border: 2px solid var(--neon-lime);
}

.popup-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}

.popup-handle {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

.popup-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border-light);
}

.popup-metric-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
  background: var(--bg-card);
}

.popup-metric-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.popup-metric-box[data-band="elite"] .popup-metric-value { color: var(--band-elite); }
.popup-metric-box[data-band="top"] .popup-metric-value { color: var(--band-top); }
.popup-metric-box[data-band="good"] .popup-metric-value { color: var(--band-good); }
.popup-metric-box[data-band="mid"] .popup-metric-value { color: var(--band-mid); }
.popup-metric-box[data-band="low"] .popup-metric-value { color: var(--band-low); }

.popup-metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}

.popup-platforms-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  padding: 16px 24px 8px;
}

.popup-platforms {
  padding: 0 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-platform-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  text-decoration: none;
  color: inherit;
  transition: all var(--transition-fast);
}

.popup-platform-row:hover {
  border-color: var(--neon-lime);
  background: var(--bg-elevated);
  transform: translateX(4px);
}

.popup-platform-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}

.popup-platform-row.instagram .popup-platform-icon { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.popup-platform-row.youtube .popup-platform-icon { background: #FF0000; }
.popup-platform-row.tiktok .popup-platform-icon { background: #010101; }
.popup-platform-row.x .popup-platform-icon { background: #1D9BF0; }
.popup-platform-row.facebook .popup-platform-icon { background: #0866FF; }
.popup-platform-row.twitch .popup-platform-icon { background: #9146FF; }

.popup-platform-icon svg {
  width: 18px;
  height: 18px;
}

.popup-platform-info {
  flex: 1;
  min-width: 0;
}

.popup-platform-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.popup-platform-handle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.popup-platform-stats {
  display: flex;
  gap: 16px;
  flex-shrink: 0;
}

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

.popup-stat-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
}

.popup-stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.popup-no-data {
  text-align: center;
  color: var(--text-muted);
  padding: 24px;
  font-size: 14px;
}

/* ============ TOAST ============ */
.toast-container {
  position: fixed;
  bottom: 96px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10000;
}

.toast {
  padding: 14px 22px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: white;
  animation: toastIn 0.3s cubic-bezier(0.25,0.46,0.45,0.94), toastOut 0.3s ease 3s forwards;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(10px);
}

.toast.success { background: var(--clr-success); }
.toast.error { background: var(--clr-danger); }
.toast.info { background: var(--neon-lime); color: #0D0D0D; }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}

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

/* ============ HAMBURGER BUTTON ============ */
/* Always visible — opens the side menu */

/* ============ MOBILE NAV USER INFO ============ */
.mobile-nav-user {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border-light);
  background: var(--primary-bg);
}
.mobile-nav-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 6px rgba(13, 148, 136, 0.5);
}
.mobile-nav-user-dot.admin {
  background: var(--primary);
  box-shadow: 0 0 8px rgba(13, 148, 136, 0.7);
}
.mobile-nav-user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.5px;
}
.mobile-notif-count {
  margin-left: auto;
  background: var(--band-low);
  color: white;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 50px;
  line-height: 1;
}

/* ============ MOBILE NAV OVERLAY ============ */
.mobile-nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--overlay-bg);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-nav-overlay.open {
  display: flex;
  opacity: 1;
}

.mobile-nav {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  max-width: 85vw;
  min-height: 100%;
  height: auto;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  padding: 0 0 40px 0;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-lg);
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.mobile-nav-overlay.open .mobile-nav {
  transform: translateX(0);
}

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

.mobile-nav-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.mobile-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 20px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border-bottom: 1px solid var(--border-light);
  flex-shrink: 0;
}

.mobile-nav-btn:hover,
.mobile-nav-btn:active {
  background: var(--primary-glow);
  color: var(--primary);
}

.mobile-nav-btn.active {
  color: var(--neon-lime);
  background: var(--primary-bg);
  border-left: 3px solid var(--neon-lime);
}

.mobile-nav-btn svg {
  flex-shrink: 0;
}

.mobile-nav-spacer {
  min-height: 16px;
  flex-shrink: 0;
}

.mobile-login-btn {
  color: var(--neon-lime);
  border-top: none;
  border-bottom: none;
}

.mobile-logout-btn {
  color: var(--band-low);
  border-bottom: none;
  margin-bottom: 20px;
}

/* ============ RESPONSIVE ============ */

/* --- Tablet (769px - 1024px) --- */
@media (max-width: 1024px) {
  .header-tagline { display: none; }
  .header-divider { display: none; }

  .ranking-list {
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 14px;
  }

  .info-card {
    max-width: 540px;
    margin: 0 auto 24px;
    padding: 28px;
  }

  .admin-card-header {
    flex-wrap: wrap;
    gap: 12px;
  }

  .admin-platform-row {
    flex-wrap: wrap;
  }

  .popup-content {
    max-width: 90vw;
  }

  .refresh-overlay-content {
    min-width: 280px;
    max-width: 90vw;
    padding: 36px 28px 28px;
  }
}

/* Hide sidebar items that duplicate the top bar on desktop */
@media (min-width: 769px) {
  .mobile-nav .nav-dup { display: none !important; }
}

/* --- Mobile landscape / small tablet (481px - 768px) --- */
@media (max-width: 768px) {
  /* Hide desktop nav on mobile */
  .header-nav { display: none; }
  .header-center { display: none; }
  .header-inner {
    gap: 0;
    padding: 0 16px;
    justify-content: flex-end;
  }
  /* Logo centered absolutely */
  .header-left {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
  /* Hide divider and tagline on mobile */
  .header-divider,
  .header-tagline { display: none; }
  .logo-badge { display: none; }

  /* Hide all header-right buttons except hamburger and notifications on mobile */
  .header-right > *:not(#btn-hamburger):not(#btn-notif):not(.notif-dropdown) { display: none !important; }

  /* Mobile notification dropdown: full width */
  .notif-dropdown {
    position: fixed;
    top: 56px;
    left: 8px;
    right: 8px;
    width: auto;
    z-index: 210;
  }

  .ranking-hero {
    padding: 24px 16px 12px;
  }

  .ranking-hero h1 { font-size: 22px; }
  .ranking-subtitle { font-size: 13px; }

  .ranking-container { padding: 0 12px 40px; }

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

  .rank-avatar-wrap, .rank-avatar { width: 64px; height: 64px; }
  .rank-card { padding: 14px 12px 18px; }
  .rank-card-name { font-size: 14px; }
  .rank-card-score { padding: 7px 14px; font-size: 14px; }
  .rank-card-er { padding: 7px 12px; font-size: 13px; }

  .info-card {
    margin: 0 auto 20px;
    padding: 24px 18px;
  }

  .info-card h2 { font-size: 18px; }
  .info-tab { font-size: 12px; padding: 8px 8px; }
  .info-tab svg { display: none; }
  .info-feature-grid { grid-template-columns: 1fr; }
  .info-weight-grid { grid-template-columns: repeat(3, 1fr); }

  .score-formula { font-size: 11px; padding: 12px 14px; }

  .page-header {
    padding: 20px 16px 0;
    flex-wrap: wrap;
    gap: 12px;
  }

  .admin-section { padding: 0 12px; }

  .admin-tab-panel { padding: 20px 16px 32px; }
  .admin-hero-inner { padding: 0 16px; flex-wrap: wrap; gap: 12px; }
  .admin-tab-nav { padding: 0 12px; }
  .admin-tab { padding: 12px 12px; font-size: 13px; }
  .admin-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .admin-users-grid, .admin-system-grid { grid-template-columns: 1fr; }
  .admin-qa-grid { grid-template-columns: 1fr; }

  .admin-card-header {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
  }

  .admin-card-right {
    width: 100%;
    justify-content: space-between;
  }

  .admin-card-controls {
    width: auto;
  }

  .admin-platforms { padding: 10px 12px 14px; }

  .admin-platform-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
  }

  .admin-add-platform-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-add-platform-row .input-sm[type="text"] { width: 100%; flex: none; }

  .modal {
    max-width: 90vw;
    padding: 24px;
    margin: 16px;
  }

  .popup-header { padding: 20px; gap: 12px; }
  .popup-avatar, .popup-avatar.default-avatar { width: 52px; height: 52px; font-size: 22px; }
  .popup-name { font-size: 18px; }
  .popup-platforms-title { padding: 12px 16px 6px; }
  .popup-platforms { padding: 0 12px 16px; }

  .toast-container {
    right: 12px;
    bottom: 90px;
    left: 12px;
  }

  .toast { font-size: 12px; padding: 10px 16px; }
}

/* --- Smartphone (≤ 480px) --- */
@media (max-width: 480px) {
  :root {
    --header-h: 50px;
  }

  .header-inner { padding: 0 10px; }
  .logo-icon { display: none; }

  .ranking-hero {
    padding: 16px 12px 8px;
  }

  .ranking-hero h1 { font-size: 20px; }

  .ranking-container { padding: 0 10px 32px; }

  .ranking-list {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .rank-card {
    padding: 10px 8px 14px;
    gap: 8px;
    border-radius: var(--radius-sm);
  }

  .rank-badge {
    width: 24px;
    height: 24px;
    font-size: 10px;
  }

  .compare-check {
    width: 20px;
    height: 20px;
    font-size: 10px;
  }

  .fav-btn {
    font-size: 16px;
    padding-left: 5px;
  }

  .rank-avatar-wrap, .rank-avatar { width: 52px; height: 52px; }
  .rank-avatar-ring { inset: -4px; }

  .rank-card-name { font-size: 13px; padding: 0 20px; }
  .rank-card-handle { font-size: 11px; }

  .rank-card-platforms { gap: 3px; }
  .platform-pill { padding: 3px 7px; font-size: 9px; }

  .rank-card-metrics { gap: 6px; flex-wrap: wrap; justify-content: center; }
  .rank-card-score { padding: 6px 12px; font-size: 13px; }
  .rank-card-score .score-label { font-size: 9px; }
  .rank-card-er { padding: 6px 10px; font-size: 12px; }
  .rank-card-er .er-label { font-size: 9px; }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 12px 0;
  }

  .page-header h1 { font-size: 20px; }

  .admin-section { padding: 0 8px; margin-bottom: 16px; }

  .admin-tab-panel { padding: 16px 12px 28px; }
  .admin-tab { padding: 10px 10px; font-size: 12px; gap: 5px; }
  .admin-tab svg { display: none; }
  .admin-hero-title { font-size: 18px; }
  .admin-hero-sub { display: none; }
  .admin-kpi-row { grid-template-columns: 1fr 1fr; gap: 10px; }
  .admin-kpi-value { font-size: 22px; }

  .admin-bonus-group {
    flex-wrap: wrap;
    gap: 4px;
  }

  .bonus-input { width: 56px; padding: 5px 6px; }

  .admin-platform-stats { font-size: 11px; }

  .admin-add-platform-row {
    flex-direction: column;
    padding: 20px 20px 16px 30px;
    align-items: stretch;
  }

  .admin-add-platform-row .input-sm { width: 100%; }
  select.input-sm { min-width: 0; width: 100%; }

  .info-card {
    margin: 0 auto 16px;
    padding: 18px 14px;
  }

  .info-card h2 { font-size: 17px; }
  .info-card > p { font-size: 13px; }
  .info-section { padding: 14px; }
  .info-section li { font-size: 13px; }
  .info-weight-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .info-weight-val { font-size: 16px; }
  .info-presence-row { gap: 6px; }
  .info-presence-item { font-size: 11px; padding: 5px 10px; }
  .info-feature-grid { grid-template-columns: 1fr; gap: 8px; }
  .info-account-card { padding: 14px; gap: 12px; }

  .logo-f.big { font-size: 40px; }
  .logo-rest.big { font-size: 32px; }

  .score-bands { gap: 6px; }
  .score-band-item { padding: 5px 10px; font-size: 11px; }

  .modal {
    max-width: calc(100vw - 24px);
    padding: 24px 20px;
    border-radius: var(--radius-sm);
  }

  .popup-metrics {
    grid-template-columns: repeat(2, 1fr);
  }

  .popup-metric-value { font-size: 16px; }
  .popup-metric-label { font-size: 10px; }

  .popup-platform-row { gap: 10px; padding: 10px 12px; }
  .popup-platform-icon { width: 32px; height: 32px; border-radius: 8px; }
  .popup-platform-name { font-size: 13px; }
  .popup-platform-stats {
    gap: 10px;
    width: 100%;
    justify-content: space-around;
    padding-top: 8px;
    border-top: 1px solid var(--border-light);
    margin-top: 4px;
  }
  .popup-platform-row { flex-wrap: wrap; }
  .popup-stat { align-items: center; }
}

/* --- Very small screens (≤ 360px) --- */
@media (max-width: 360px) {
  .ranking-list { grid-template-columns: 1fr; }

  .rank-card {
    flex-direction: row;
    flex-wrap: wrap;
    text-align: left;
    padding: 12px;
    gap: 10px;
  }

  .rank-card-topbar {
    width: 100%;
    margin-bottom: 6px;
  }

  .compare-check { opacity: 1; }
  .fav-btn { opacity: 1; }

  .rank-avatar-wrap, .rank-avatar { width: 44px; height: 44px; }

  .rank-card-name { padding: 0; }

  .rank-card-name, .rank-card-handle, .rank-card-bio, .rank-card-platforms, .rank-card-metrics {
    width: 100%;
  }

  .rank-card-platforms { justify-content: flex-start; }
  .rank-card-metrics { justify-content: flex-start; }

  .admin-card-right {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .admin-card-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .admin-card-chevron {
    align-self: center;
  }

  .admin-bonus-group { justify-content: space-between; }
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }

/* ============ SINGLE REFRESH BTN ============ */
.btn-refresh-single {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(13, 148, 136, 0.08);
  border: 1px solid rgba(13, 148, 136, 0.25);
  border-radius: 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-refresh-single:hover {
  background: rgba(13, 148, 136, 0.18);
  border-color: var(--accent);
}
.btn-refresh-single:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.btn-refresh-single .refresh-spinner {
  width: 14px;
  height: 14px;
  border: 2px solid rgba(13, 148, 136, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.btn-refresh-single.loading {
  background: rgba(13, 148, 136, 0.05);
}
.btn-stop-single {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.30);
  border-radius: 8px;
  color: #dc2626;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-stop-single:hover {
  background: rgba(220, 38, 38, 0.18);
  border-color: #dc2626;
}
.btn-stop-single:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ============ VERIFY TOGGLE BTN ============ */
.btn-verify-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  background: rgba(100, 116, 139, 0.08);
  border: 1px solid rgba(100, 116, 139, 0.25);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.btn-verify-toggle:hover {
  background: rgba(13, 148, 136, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-verify-toggle.verified {
  background: rgba(13, 148, 136, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}
.btn-verify-toggle.verified:hover {
  background: rgba(220, 38, 38, 0.08);
  border-color: rgba(220, 38, 38, 0.30);
  color: #dc2626;
}

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

/* ============ AUTH MODALS ============ */
/* ============ AUTH SPLIT MODAL ============ */
.auth-overlay {
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.auth-split-modal {
  display: flex;
  width: 100%;
  max-width: 880px;
  min-height: 520px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(0,0,0,0.6);
  animation: authSlideIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes authSlideIn {
  from { opacity: 0; transform: scale(0.94) translateY(16px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* LEFT — brand panel */
.auth-brand-panel {
  position: relative;
  width: 42%;
  flex-shrink: 0;
  background: linear-gradient(145deg, #0a4f4a 0%, #0D9488 50%, #06B6D4 100%);
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.auth-brand-panel-inner {
  position: relative;
  z-index: 1;
}
.auth-brand-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
  pointer-events: none;
}
.auth-brand-logo {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 12px;
}
.auth-brand-logo .logo-f {
  color: #fff;
  text-shadow: 0 0 30px rgba(255,255,255,0.4);
}
.auth-brand-logo .logo-rest {
  color: rgba(255,255,255,0.9);
}
.auth-brand-tagline {
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  margin: 0 0 28px;
  line-height: 1.4;
}
.auth-brand-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 28px;
}
.auth-brand-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-brand-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.auth-brand-stat-lbl {
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.auth-brand-features {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-brand-feat {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.85);
  font-weight: 500;
}
.auth-brand-feat svg {
  flex-shrink: 0;
  color: #fff;
}
/* Register variant: role list */
.auth-register-roles {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-register-role {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.12);
}
.auth-register-role-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.auth-register-role > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-register-role strong {
  font-size: 13px;
  color: #fff;
  font-weight: 700;
}
.auth-register-role span {
  font-size: 11px;
  color: rgba(255,255,255,0.65);
  line-height: 1.3;
}

/* RIGHT — form panel */
.auth-form-panel {
  position: relative;
  flex: 1;
  background: var(--bg-card);
  padding: 40px 40px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 90vh;
}
.auth-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.auth-close-btn:hover {
  background: var(--border);
  color: var(--text);
}
.auth-form-header {
  margin-bottom: 24px;
}
.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 4px;
}
.auth-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* Fields */
.auth-field {
  margin-bottom: 14px;
}
.auth-field label {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.auth-field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}
.auth-field-row label {
  margin-bottom: 0;
}
.auth-forgot {
  font-size: 11.5px;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  opacity: 0.8;
  transition: opacity 0.15s;
}
.auth-forgot:hover { opacity: 1; }
.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-input-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
  flex-shrink: 0;
}
.auth-input {
  width: 100%;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px 11px 40px;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}
.auth-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-bg);
}
.auth-input::placeholder { color: var(--text-muted); }
.auth-eye-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  padding: 4px;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  border-radius: 4px;
  transition: color 0.15s;
}
.auth-eye-btn:hover { color: var(--text); }
.auth-eye-btn.active { color: var(--primary); }

/* Submit button */
.auth-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  margin-top: 8px;
  background: linear-gradient(135deg, var(--primary) 0%, #06B6D4 100%);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--transition-fast);
  box-shadow: 0 4px 20px rgba(13,148,136,0.35);
}
.auth-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(13,148,136,0.45);
}
.auth-submit-btn:active {
  transform: translateY(0);
}
.auth-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

/* Error */
.auth-error {
  font-size: 13px;
  color: #ef4444;
  text-align: center;
  min-height: 18px;
  margin: 8px 0 0;
}

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--text-muted);
  font-size: 12px;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Social login buttons */
.auth-social-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}
.auth-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 1.5px solid var(--border);
}
.auth-social-google {
  background: var(--bg-card);
  color: var(--text);
}
.auth-social-google:hover {
  background: var(--bg-hover);
  border-color: #4285F4;
  box-shadow: 0 2px 12px rgba(66,133,244,0.15);
  transform: translateY(-1px);
}

/* Switch link */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}
.auth-switch a {
  color: var(--primary);
  font-weight: 700;
  text-decoration: none;
  margin-left: 4px;
}
.auth-switch a:hover { text-decoration: underline; }
.auth-optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-muted);
}

/* Registration type cards */
.reg-type-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.reg-type-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg-elevated);
  cursor: pointer;
  transition: all 0.2s;
}
.reg-type-card:hover {
  border-color: var(--primary);
  background: var(--primary-bg);
}
.reg-type-card.active {
  border-color: var(--primary);
  background: var(--primary-bg);
  box-shadow: 0 0 0 1px var(--primary);
}
.reg-type-icon { font-size: 20px; line-height: 1; }
.reg-type-name { font-size: 12px; font-weight: 700; color: var(--text); }
.reg-type-desc { font-size: 9.5px; color: var(--text-muted); text-align: center; line-height: 1.3; }

/* Responsive */
@media (max-width: 700px) {
  .auth-split-modal {
    flex-direction: column;
    max-height: 95vh;
    overflow-y: auto;
    border-radius: 16px;
  }
  .auth-brand-panel {
    width: 100%;
    padding: 24px 24px 20px;
    min-height: auto;
  }
  .auth-brand-stats { gap: 16px; }
  .auth-brand-features { display: none; }
  .auth-register-roles { display: none; }
  .auth-brand-stat-val { font-size: 18px; }
  .auth-form-panel {
    padding: 24px 20px 20px;
    max-height: none;
  }
  .reg-type-cards {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .reg-type-card {
    flex-direction: row;
    gap: 10px;
    padding: 8px 12px;
    text-align: left;
  }
  .reg-type-desc { text-align: left; }
}

/* ============ USER BAR ============ */
.user-bar {
  display: flex;
  align-items: center;
  gap: 3px;
}
.user-pill {
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.2);
}
.user-pill .admin-label {
  color: #3b82f6;
}
.user-dot {
  background: #3b82f6;
  box-shadow: 0 0 5px rgba(59, 130, 246, 0.4);
}

/* ============ FAVORITE BUTTON ============ */
.fav-btn {
  background: none;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 2px;
  transition: all 0.2s;
  flex-shrink: 0;
  padding-left: 5px;
  opacity: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.rank-card:hover .fav-btn,
.fav-btn.active {
  opacity: 1;
}
.fav-btn:hover {
  opacity: 1;
  transform: scale(1.15);
}
.fav-btn.active {
  color: #ff4d6d;
  opacity: 1;
}

/* ============ EDIT PROFILE ============ */
.edit-profile-container {
  max-width: 560px;
  margin: 0 auto;
  padding: 40px 16px 40px;
}
.edit-profile-container h1 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
}
.edit-profile-container h1 span {
  color: var(--accent);
}
.edit-profile-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 28px;
}
.edit-profile-photo-section {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
  padding: 20px;
  background: var(--bg-surface);
  border-radius: 16px;
  border: 1px solid var(--border-light);
}
.edit-profile-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid var(--border-light);
  flex-shrink: 0;
}
.edit-profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.edit-profile-avatar svg {
  color: var(--text-muted);
}
.edit-profile-photo-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.edit-profile-photo-actions .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
}
.edit-profile-photo-actions .btn-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-danger-sm {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid rgba(239,68,68,0.3);
  background: transparent;
  color: #ef4444;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-danger-sm:hover {
  background: rgba(239,68,68,0.1);
}
.edit-profile-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.edit-profile-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.edit-profile-charcount {
  font-weight: 400;
  color: var(--text-muted);
  float: right;
}
.edit-profile-field input[type="text"],
.edit-profile-field input[type="email"],
.edit-profile-field textarea {
  width: 100%;
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--font);
  border-radius: 10px;
  border: 1px solid var(--border-light);
  background: var(--bg-surface);
  color: var(--text-primary);
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.edit-profile-field input:focus,
.edit-profile-field textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.edit-profile-field input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.edit-profile-field textarea {
  resize: vertical;
  min-height: 80px;
}
.edit-profile-checkbox label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
}
.edit-profile-checkbox input[type="checkbox"] {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}
.edit-profile-actions {
  padding-top: 8px;
}
.edit-profile-actions .btn-primary {
  width: 100%;
}

/* Mobile nav divider */
.mobile-nav-divider {
  height: 1px;
  background: var(--border-light);
  margin: 4px 16px;
  flex-shrink: 0;
}

/* Mobile nav avatar */
.mobile-nav-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 2px solid whitesmoke;
  flex-shrink: 0;
}
.mobile-nav-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.mobile-nav-avatar svg {
  color: var(--text-muted);
}

@media (max-width: 768px) {
  .edit-profile-container { padding: 20px 16px 40px; }
  .edit-profile-container h1 { font-size: 20px; }
  .edit-profile-photo-section { flex-direction: column; text-align: center; }
}

/* ============ DASHBOARD ============ */
.dashboard-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 32px 24px 0;
}
.dashboard-header h1 {
  font-size: 26px;
  font-weight: 800;
  margin: 0 0 6px;
  letter-spacing: -0.3px;
}
.dashboard-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
}
.dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 20px;
  text-align: center;
  color: var(--text-secondary);
}
.dashboard-empty svg { stroke: var(--text-muted); }
.dashboard-empty p { font-size: 15px; line-height: 1.6; }

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  padding: 28px 24px 48px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.dash-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card) !important;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 26px;
  transition: all var(--transition-fast);
}
.dash-card:hover {
  border-color: rgba(13, 148, 136, 0.2);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.dash-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
  position: relative;
}
.dash-card-rank {
  font-size: 14px;
  font-weight: 800;
  color: var(--accent);
  min-width: 28px;
}
.dash-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.dash-avatar.default-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 18px;
}
.dash-card-info { flex: 1; min-width: 0; }
.dash-card-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-card-handle {
  font-size: 12px;
  color: var(--text-muted);
}
.dash-card-header .fav-btn {
  position: static;
  flex-shrink: 0;
  opacity: 1;
  font-size: 18px;
}

.dash-card-metrics {
  display: flex;
  gap: 8px;
  justify-content: space-around;
  margin-bottom: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.dash-metric { text-align: center; flex: 1; }
.dash-metric-value {
  display: block;
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
}
.dash-metric-value[data-band="elite"] { color: var(--accent); }
.dash-metric-value[data-band="top"] { color: #22d3ee; }
.dash-metric-label {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.dash-card-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}

.dash-card-spacer { flex: 1; }

.btn-history {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 12px;
  background: var(--primary-bg);
  border: 1px solid rgba(13, 148, 136, 0.15);
  border-radius: var(--radius-xs);
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-top: auto;
}
.btn-history:hover {
  background: var(--primary-glow);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ============ HISTORY TABLE ============ */
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.history-table th {
  text-align: left;
  padding: 8px 12px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid var(--border);
}
.history-table td {
  padding: 8px 12px;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
}
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(13, 148, 136, 0.03); }

/* ============ DASHBOARD RESPONSIVE ============ */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
  }
}
@media (max-width: 480px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .dash-card-metrics { gap: 6px; }
  .dash-metric-value { font-size: 16px; }
  .dashboard-header h1 { font-size: 20px; }
}

/* ============ RANKING FILTERS ============ */
.ranking-filters {
  max-width: var(--max-w);
  margin: 0 auto 24px;
  padding: 0 24px;
}
.filters-row {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  flex: 1;
  min-width: 160px;
  max-width: 500px;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
.search-box:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-bg);
}
.search-box svg { color: var(--text-muted); flex-shrink: 0; }
.search-box input {
  background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font);
  font-size: 14px; width: 100%;
}
.search-box input::placeholder { color: var(--text-muted); }

/* Search clear button */
.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  padding: 0 2px;
  flex-shrink: 0;
  transition: color 0.15s;
}
.search-clear:hover { color: var(--text); }
.filter-group { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filter-select {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s;
  white-space: nowrap;
}
.filter-select:focus { border-color: var(--primary); outline: none; }

/* Advanced Filters */
.advanced-filters {
  display: none;
  flex-wrap: wrap;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
}
.adv-filter-row { display: flex; gap: 12px; flex-wrap: wrap; width: 100%; }
.adv-filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 120px;
}
.adv-filter-group label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.adv-filter-group input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  padding: 6px 10px;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
}
.adv-filter-group input:focus { border-color: var(--primary); outline: none; }
.btn-toggle-adv-filters {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  padding: 7px 12px;
  border-radius: var(--radius-xs);
  background: white !important;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-toggle-adv-filters:hover { border-color: var(--primary); color: var(--primary); }
.platform-tabs {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-bottom: 6px;
  justify-content: center;
}
.platform-tab {
  display: flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 11px; font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  font-family: var(--font);
}
.platform-tab:hover { border-color: var(--primary); color: var(--text); }
.platform-tab.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}
.platform-tab svg { width: 13px; height: 13px; }
.ranking-count {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 12px;
  max-width: var(--max-w);
  margin-left: auto; margin-right: auto;
  padding: 0 20px;
}
@media (max-width: 640px) {
  .filters-row { flex-direction: column; gap: 8px; }
  .search-box { min-width: 100%; max-width: none; }
  .filter-group { width: 100%; }
  .filter-select { flex: 1; }
  .btn-toggle-adv-filters { margin-left: 0; width: 100%; justify-content: center; }
}

/* ============ COMPARE CHECKBOX ============ */
.compare-check {
  width: 22px; height: 22px;
  border-radius: 6px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-size: 12px;
  color: transparent;
  flex-shrink: 0;
  opacity: 0;
}
.rank-card:hover .compare-check,
.compare-check.active {
  opacity: 1;
}
.compare-check:hover { border-color: var(--primary); }
.compare-check.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #000;
}

/* ============ COMPARE FLOATING BAR ============ */
.compare-bar {
  position: fixed;
  bottom: 24px;
  left: 50%; transform: translateX(-50%);
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-lg);
  z-index: 150;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity: 0; transform: translateX(-50%) translateY(20px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }
.compare-bar-text { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; }
.compare-bar-btn { padding: 8px 20px !important; font-size: 13px !important; }
.compare-bar-clear {
  background: none; border: none; color: var(--text-muted);
  font-size: 20px; cursor: pointer; padding: 0 4px;
  transition: color 0.2s;
}
.compare-bar-clear:hover { color: var(--text); }

/* ============ PROFILE PAGE ============ */
.profile-container { max-width: var(--max-w); margin: 0 auto; padding: 44px 24px 0; }
.profile-hero {
  background: var(--bg-card);
  border-radius: 22px;
  box-shadow: var(--shadow-card);
  padding: 44px 40px;
  margin-top: 30px;
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin-bottom: 28px;
  border: 1px solid var(--border-subtle);
  position: relative;
  overflow: hidden;
}
.profile-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--fluenk-accent));
  border-radius: 22px 22px 0 0;
}
.profile-avatar-wrap { flex-shrink: 0; }
.profile-avatar {
  width: 110px; height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--border-subtle);
  box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}
.profile-avatar.default-avatar {
  width: 110px; height: 110px;
  display: flex; align-items: center; justify-content: center;
  font-size: 42px; font-weight: 800;
  background: var(--bg-elevated);
  color: var(--primary);
}
.profile-info { flex: 1; padding-left: 8px; }
.profile-name {
  font-size: 28px; font-weight: 800;
  text-align: center !important;
  margin-bottom: 2px;
  color: var(--text);
  letter-spacing: -0.4px;
}
.profile-handle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 10px;
  font-weight: 500;
}
.profile-bio {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
  line-height: 1.65;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}
.profile-info .fav-btn {
  position: static;
  opacity: 1;
  flex-shrink: 0;
}
.profile-last-updated {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 12px;
}
.profile-export-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-export-csv {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
  color: var(--text);
}
.profile-metrics {
  padding-top: 30px;
  display: flex; gap: 12px; flex-wrap: wrap;
  border-bottom: 0px !important;
}
.profile-metric-box {
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  padding: 18px 24px;
  text-align: center;
  min-width: 110px;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.profile-metric-box:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.profile-metric-value {
  font-size: 24px; font-weight: 800;
  display: block;
  letter-spacing: -0.5px;
}
.profile-metric-label {
  font-size: 10px; font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  margin-top: 4px;
}
.profile-metric-box[data-band="elite"] .profile-metric-value { color: var(--band-elite); }
.profile-metric-box[data-band="top"] .profile-metric-value { color: var(--band-top); }
.profile-metric-box[data-band="good"] .profile-metric-value { color: var(--band-good); }
.profile-metric-box[data-band="mid"] .profile-metric-value { color: var(--band-mid); }
.profile-metric-box[data-band="low"] .profile-metric-value { color: var(--band-low); }
.profile-section-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 14px;
  color: var(--text-primary) !important;
}

/* ============ PLATFORM DETAIL CARDS (shared) ============ */
.plat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 0px;
}
.plat-detail-card {
  background: rgba(13, 135, 134, 0.4);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--accent);
  padding: 22px 24px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  position: relative;
  overflow: hidden;
}
.plat-detail-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.plat-detail-card[data-platform="instagram"] { border-top-color: #E1306C; }
.plat-detail-card[data-platform="youtube"]   { border-top-color: #FF0000; }
.plat-detail-card[data-platform="tiktok"]    { border-top-color: #00f2ea; }
.plat-detail-card[data-platform="x"]         { border-top-color: #1DA1F2; }
.plat-detail-card[data-platform="facebook"]  { border-top-color: #1877F2; }
.plat-detail-card[data-platform="twitch"]    { border-top-color: #9146FF; }
.plat-detail-card[data-platform="linkedin"]  { border-top-color: #0A66C2; }
.plat-detail-card[data-platform="threads"]   { border-top-color: #000; }
.plat-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 800;
  color: white;
}
.plat-card-header .platform-dot { width: 32px; height: 32px; }
.plat-card-handle {
  font-size: 13px;
  color: white;
}
.plat-card-handle a {
  color: white;
  text-decoration: none;
  transition: color 0.15s;
}
.plat-card-handle a:hover { color: var(--accent); text-decoration: underline; }
.plat-card-displayname {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  color: white;
}
.plat-card-stats {
  display: flex;
  gap: 18px;
  margin-top: 6px;
  color: white;
}
.plat-card-stat {
  display: flex;
  flex-direction: column;
  color: white;
}
.plat-card-stat-val {
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
  color: white;
}
.plat-card-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: white;
}
.plat-card-stat-note {
  font-size: 9px;
  font-weight: 600;
  color: white;
  opacity: 0.7;
  letter-spacing: 0.3px;
}
.plat-card-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  margin-top: auto;
}
.plat-card-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease;
}
.plat-detail-card[data-platform="instagram"] .plat-card-bar-fill { background: #E1306C; }
.plat-detail-card[data-platform="youtube"]   .plat-card-bar-fill { background: #FF0000; }
.plat-detail-card[data-platform="tiktok"]    .plat-card-bar-fill { background: #00f2ea; }
.plat-detail-card[data-platform="x"]         .plat-card-bar-fill { background: #1DA1F2; }
.plat-detail-card[data-platform="facebook"]  .plat-card-bar-fill { background: #1877F2; }
.plat-detail-card[data-platform="twitch"]    .plat-card-bar-fill { background: #9146FF; }
.plat-detail-card[data-platform="linkedin"]  .plat-card-bar-fill { background: #0A66C2; }
.plat-detail-card[data-platform="threads"]   .plat-card-bar-fill { background: #000; }
@media (max-width: 600px) {
  .plat-cards-grid { grid-template-columns: 1fr; }
  .plat-card-stats { gap: 12px; }
  .plat-card-stat-val { font-size: 15px; }
}

/* Profile platforms — reuse shared cards */
.profile-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.profile-platform-card {
  display: flex; align-items: center; gap: 14px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.15s, box-shadow 0.15s;
}
.profile-platform-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.profile-platform-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.profile-platform-icon.instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); color: white; }
.profile-platform-icon.youtube { background: #FF0000; color: white; }
.profile-platform-icon.tiktok { background: #000; color: white; }
.profile-platform-icon.x { background: #000; color: white; }
.profile-platform-icon.facebook { background: #1877F2; color: white; }
.profile-platform-icon.twitch { background: #9146FF; color: white; }
.profile-platform-detail { flex: 1; }
.profile-platform-name { font-weight: 700; font-size: 14px; }
.profile-platform-handle { color: var(--text-muted); font-size: 12px; }
.profile-platform-stats { text-align: right; }
.profile-platform-followers { font-weight: 800; font-size: 16px; }
.profile-platform-er { color: var(--text-muted); font-size: 12px; }
.profile-history {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 24px;
}
.profile-history-chart {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 120px;
  padding: 8px 0;
}
.chart-bar-wrap {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center;
  gap: 4px;
  height: 100%;
  justify-content: flex-end;
}
.chart-bar {
  width: 100%;
  min-width: 6px;
  max-width: 28px;
  border-radius: 4px 4px 0 0;
  background: var(--primary);
  opacity: 0.7;
  transition: opacity 0.15s;
}
.chart-bar:hover { opacity: 1; }
.chart-bar-label {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .profile-hero { margin-top: 30px; flex-direction: column; align-items: center; text-align: center; padding: 32px 24px; }
  .profile-info { padding-left: 0; }
  .profile-metrics { justify-content: center; }
  .profile-name { font-size: 22px; text-align: center;}
  .profile-avatar { width: 90px; height: 90px; }
  .profile-avatar.default-avatar { width: 90px; height: 90px; font-size: 34px; }
  .profile-bio { text-align: center; }
  .profile-categories { justify-content: center; }
}

/* ============ INSTAGRAM STORIES ============ */
/* IG Engagement Cards */
.profile-ig-engagement {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.ig-eng-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}
.ig-eng-value {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 4px;
}
.ig-eng-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

/* ============ COMPARE PAGE ============ */
.compare-header {
  max-width: var(--max-w);
  margin: 0 auto 24px;
  padding: 0 20px;
}
.compare-header h1 {
  font-size: 28px; font-weight: 800;
}
.compare-header h1 span { color: var(--primary); }
.compare-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}
.compare-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.compare-empty {
  display: flex; flex-direction: column;
  align-items: center;
  padding: 60px 20px;
  color: var(--text-muted);
  gap: 16px;
  text-align: center;
}
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.compare-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  text-align: center;
}
.compare-card-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 12px;
  border: 2px solid var(--primary);
}
.compare-card-avatar.default-avatar {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800;
  background: var(--bg-elevated);
  color: var(--primary);
}
.compare-card-name { font-weight: 700; font-size: 16px; margin-bottom: 2px; }
.compare-card-handle { color: var(--text-muted); font-size: 13px; margin-bottom: 16px; }
.compare-metric-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}
.compare-metric-row:last-child { border-bottom: none; }
.compare-metric-label { color: var(--text-muted); }
.compare-metric-val { font-weight: 700; }
.compare-metric-val.best { color: var(--primary); }
.compare-platforms-list {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

/* ============ STATS PAGE ============ */
.stats-header {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 24px;
  text-align: center;
}
.stats-header h1 {
  font-size: 28px; font-weight: 800;
}
.stats-header h1 span { color: var(--primary); }
.stats-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 4px;
}
.stats-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px;
}
.stats-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  text-align: center;
  border: 1px solid var(--border-subtle);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.stat-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  background: var(--primary-bg);
  color: var(--primary);
}
.stat-card-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
}
.stat-card-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stats-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 20px;
}
.stats-section-title {
  font-size: 16px; font-weight: 700;
  margin-bottom: 16px;
}
.stats-band-bars {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 140px;
  padding: 0 10px;
}
.stats-band-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  height: 100%;
  justify-content: flex-end;
}
.stats-band-bar {
  width: 100%;
  border-radius: 6px 6px 0 0;
  transition: height 0.5s ease;
}
.stats-band-bar.elite { background: var(--band-elite); }
.stats-band-bar.top { background: var(--band-top); }
.stats-band-bar.good { background: var(--band-good); }
.stats-band-bar.mid { background: var(--band-mid); }
.stats-band-bar.low { background: var(--band-low); }
.stats-band-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.stats-band-count { font-size: 13px; font-weight: 800; }
.stats-platform-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-light);
}
.stats-platform-row:last-child { border-bottom: none; }
.stats-platform-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-size: 16px;
}
.stats-platform-icon.instagram { background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.stats-platform-icon.youtube { background: #FF0000; }
.stats-platform-icon.tiktok { background: #000; }
.stats-platform-icon.x { background: #000; }
.stats-platform-icon.facebook { background: #1877F2; }
.stats-platform-icon.twitch { background: #9146FF; }
.stats-platform-icon.linkedin { background: #0A66C2; }
.stats-platform-icon.threads { background: #000; }
.stats-platform-name { font-weight: 700; font-size: 14px; flex: 1; }
.stats-platform-meta { color: var(--text-muted); font-size: 12px; }
.stats-platform-followers { font-weight: 800; font-size: 15px; text-align: right; }
.stats-platform-bar-wrap { flex: 2; }
.stats-platform-bar-bg {
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
}
.stats-platform-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: var(--primary);
  transition: width 0.5s ease;
}

/* ============ NOTIFICATION BELL ============ */
/* ── Notif Bell ── */
.notif-bell { position: relative; }
.notif-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: #FF3A5C;
  color: white;
  font-size: 9px;
  font-weight: 800;
  min-width: 17px; height: 17px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--bg-header, #fff);
  letter-spacing: 0;
}

/* ── Dropdown shell ── */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px); right: -10px;
  width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.08);
  z-index: 200;
  overflow: hidden;
  transform-origin: top right;
  animation: notifSlideIn .18s ease;
}
@keyframes notifSlideIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0)  scale(1); }
}

/* ── Header ── */
.notif-dropdown-header {
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.notif-header-left {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-primary);
}
.notif-header-left svg { color: var(--primary); flex-shrink: 0; }
.notif-header-count {
  background: #FF3A5C;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  min-width: 18px; height: 18px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}
.notif-read-all-btn {
  display: flex; align-items: center; gap: 4px;
  height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(13,148,136,.25);
  background: rgba(13,148,136,.07);
  color: var(--primary);
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all .18s;
}
.notif-read-all-btn:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── Body ── */
.notif-dropdown-body {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-light) transparent;
}
.notif-dropdown-body::-webkit-scrollbar { width: 4px; }
.notif-dropdown-body::-webkit-scrollbar-track { background: transparent; }
.notif-dropdown-body::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 2px; }

/* ── Section label ── */
.notif-section-label {
  padding: 8px 16px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  background: var(--bg-elevated, rgba(0,0,0,.02));
}

/* ── Single item ── */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px 11px 0;
  margin: 0 16px;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
  transition: background .15s;
  position: relative;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: transparent; }

/* Unread: accent bar on left */
.notif-item:not(.notif-read)::before {
  content: '';
  position: absolute;
  left: -16px;
  top: 12px; bottom: 12px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}
.notif-item.notif-type-msg:not(.notif-read)::before { background: #3B82F6; }
.notif-item.notif-type-down:not(.notif-read)::before { background: #FF3A5C; }

.notif-item.notif-read { opacity: .55; }
.notif-item-content { min-width: 0; flex: 1; }

/* Icon */
.notif-item-icon {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex-shrink: 0;
  margin-top: 1px;
}
.notif-item-icon.up   { background: rgba(13,148,136,.12); }
.notif-item-icon.down { background: rgba(255,58,92,.12); }
.notif-item-icon.msg  { background: rgba(59,130,246,.12); }
.notif-item-icon.act  { background: rgba(251,146,60,.12); }

/* Text layers */
.notif-item-title {
  font-weight: 700;
  font-size: 13px;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}
.notif-item-body {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 1px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.notif-item-time {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

/* Mark-read button */
.notif-mark-read {
  width: 26px; height: 26px;
  border: none;
  background: rgba(13,148,136,.08);
  color: var(--primary);
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
  transition: all .18s;
  opacity: .7;
}
.notif-mark-read:hover { background: var(--primary); color: #fff; opacity: 1; }
.notif-read-icon { display: none; }

/* Empty */
.notif-empty {
  padding: 36px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.notif-empty-icon { font-size: 28px; opacity: .4; }
@media (max-width: 640px) {
  .notif-dropdown {
    position: fixed;
    top: var(--header-h);
    left: 8px;
    right: 8px;
    width: auto;
    border-radius: 12px;
  }
  .stats-overview { grid-template-columns: repeat(2, 1fr); }
  .compare-grid { grid-template-columns: 1fr; }
}

/* ============ SIMULATOR ============ */
.sim-page { max-width: 760px; margin: 0 auto; }
.sim-hero { margin-bottom: 2rem; }
.sim-hero h1 { font-family: var(--font-display); font-size: 2.4rem; font-weight: 300; letter-spacing: -.03em; }
.sim-hero h1 span { color: var(--primary); font-weight: 700; }
.sim-subtitle { color: var(--text-secondary); font-size: 14px; margin-top: .5rem; }

.sim-formula-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.2rem 1.5rem; margin-bottom: 2rem; box-shadow: var(--shadow); }
.sim-formula-card h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .8rem; }
.sim-formula-eq { font-family: var(--font-mono, 'DM Mono', monospace); font-size: 13px; line-height: 2.2; color: var(--text-secondary); }
.sim-frac { display: inline-block; vertical-align: middle; text-align: center; }
.sim-frac-num { display: block; border-bottom: 1px solid var(--border); padding-bottom: 2px; margin-bottom: 2px; color: #2DD4BF; }
.sim-frac-den { display: block; color: var(--primary); }
.sim-presence { color: #fb923c; }

.sim-reach-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 2rem; }
.sim-reach-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: .75rem 1rem; transition: border-color .2s; box-shadow: var(--shadow); }
.sim-reach-card:hover { border-color: var(--text-muted); }
.sim-reach-name { font-size: 12px; font-weight: 600; margin-bottom: 3px; }
.sim-reach-val { font-family: var(--font-mono, monospace); font-size: 11px; color: var(--text-muted); margin-bottom: 8px; }
.sim-reach-bar-bg { height: 3px; background: var(--bg-elevated); border-radius: 2px; }
.sim-reach-bar { height: 3px; border-radius: 2px; transition: width .5s ease; }

.sim-section-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: 1rem; }
.sim-pl-toggle { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 1.5rem; }
.sim-pl-btn { font-size: 12px; font-family: var(--font-mono, monospace); padding: 5px 12px; border-radius: 6px; border: 1px solid var(--border); background: transparent; color: var(--text-muted); cursor: pointer; transition: all .15s; letter-spacing: .03em; }
.sim-pl-btn:hover { color: var(--text); border-color: var(--text-muted); }
.sim-pl-btn.active { background: var(--primary-bg); color: var(--primary); border-color: rgba(34,255,110,.3); }

.sim-pl-controls { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.5rem; }
.sim-pl-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; box-shadow: var(--shadow); }
.sim-pl-name { font-size: 12px; font-weight: 700; letter-spacing: .05em; margin-bottom: .75rem; font-family: var(--font-mono, monospace); }
.sim-input-row { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.sim-input-row:last-child { margin-bottom: 0; }
.sim-input-row label { font-size: 11px; color: var(--text-muted); min-width: 80px; letter-spacing: .03em; }
.sim-input-row input[type=range] { flex: 1; height: 3px; border-radius: 2px; background: var(--bg-elevated); outline: none; cursor: pointer; }
.sim-input-row input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--primary); cursor: pointer; transition: transform .1s; box-shadow: 0 1px 4px rgba(0,0,0,.3); }
.sim-input-row input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.2); }
.sim-input-row .sim-val { font-family: var(--font-mono, monospace); font-size: 12px; color: var(--text); min-width: 52px; text-align: right; }
.sim-num-input { font-family: var(--font-mono, monospace); font-size: 12px; color: var(--text); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: 6px; padding: 3px 8px; width: 80px; text-align: right; outline: none; transition: border-color .15s; }
.sim-num-input:focus { border-color: var(--primary); }
.sim-num-input.err { border-color: #b91c1c; color: #b91c1c; }

.sim-result-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem; margin-bottom: 1.5rem; box-shadow: var(--shadow); }
.sim-result-top { display: flex; align-items: baseline; gap: 14px; margin-bottom: 1rem; }
.sim-result-num { font-size: 4rem; font-weight: 700; letter-spacing: -.04em; color: var(--primary); line-height: 1; font-family: var(--font-display); transition: color .3s; }
.sim-result-band { font-size: 13px; font-family: var(--font-mono, monospace); padding: 4px 12px; border-radius: 6px; border: 1px solid currentColor; letter-spacing: .06em; font-weight: 600; }
.sim-score-bar-bg { height: 4px; background: var(--bg-elevated); border-radius: 2px; margin-bottom: 1.5rem; overflow: hidden; }
.sim-score-bar { height: 4px; border-radius: 2px; background: var(--primary); transition: width .45s cubic-bezier(.4,0,.2,1); }

.sim-bands-row { display: flex; gap: 0; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.sim-band-seg { flex: 1; padding: 6px 4px; text-align: center; font-family: var(--font-mono, monospace); font-size: 10px; letter-spacing: .04em; color: var(--text-muted); transition: background .3s, color .3s; background: var(--bg-card); }
.sim-band-seg:not(:last-child) { border-right: 1px solid var(--border); }

.sim-breakdown { margin-bottom: 2rem; }
.sim-breakdown h2 { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--text-muted); margin-bottom: .75rem; }
.sim-step { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: .6rem 1rem; margin-bottom: 6px; font-family: var(--font-mono, monospace); font-size: 12px; color: var(--text-muted); line-height: 1.7; }
.sim-step .sim-label { font-weight: 600; }
.sim-step-final { border-color: var(--text-muted); color: var(--text); }
.sim-empty { text-align: center; padding: 2rem; color: var(--text-muted); font-size: 13px; font-style: italic; }

@media (max-width: 500px) {
  .sim-hero h1 { font-size: 1.8rem; }
  .sim-reach-grid { grid-template-columns: repeat(2, 1fr); }
  .sim-result-num { font-size: 3rem; }
}

/* ============ GAMIFICATION v2 ============ */

/* ▸ Wrapper */
.gx-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 16px 20px 60px;
}

/* ▸ Hero profile card */
.gx-hero {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px 24px 20px;
  margin-bottom: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.gx-hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--fluenk-accent));
}
.gx-hero-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
}
.gx-hero-avatar {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--fluenk-accent));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 3px solid var(--border-light);
}
.gx-hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gx-hero-letter {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.gx-hero-info { flex: 1; min-width: 0; }
.gx-hero-name {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1.2;
}
.gx-hero-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}
.gx-hero-level {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}
.gx-lvl-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-bg);
  border: 1px solid rgba(13,148,136,.15);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  letter-spacing: .3px;
}
.gx-xp-bar {
  flex: 1;
  height: 8px;
  background: var(--bg-elevated);
  border-radius: 4px;
  overflow: hidden;
}
.gx-xp-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--fluenk-accent));
  border-radius: 4px;
  transition: width .6s ease;
  width: 0%;
}
.gx-xp-text {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  white-space: nowrap;
}

/* Hero stats */
.gx-hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  background: var(--bg-elevated);
  border-radius: 14px;
  padding: 14px 0;
}
.gx-hs {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.gx-hs-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1;
}
.gx-hs-lbl {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}
.gx-hs-sep {
  width: 1px;
  height: 30px;
  background: var(--border);
}

/* Push button */
.gx-push-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 14px;
  width: 100%;
  padding: 10px;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: none;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.gx-push-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ▸ Tab pills navigation */
/* Gamification grid menu */
.gx-grid-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px;
}
.gx-grid-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.gx-grid-icon { font-size: 24px; line-height: 1; }
.gx-grid-label { white-space: nowrap; }
.gx-grid-item:hover { border-color: var(--primary); color: var(--text); background: rgba(var(--primary-rgb), 0.05); }
.gx-grid-item.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.gx-grid-item.active .gx-grid-label { color: #fff; }
@media (min-width: 600px) {
  .gx-grid-menu { grid-template-columns: repeat(6, 1fr); }
}
@media (max-width: 380px) {
  .gx-grid-menu { grid-template-columns: repeat(3, 1fr); }
  .gx-grid-item { padding: 10px 4px; }
  .gx-grid-icon { font-size: 20px; }
  .gx-grid-label { font-size: 10px; }
}

/* Legacy – kept for reference */
.gx-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 4px;
  margin-bottom: 20px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gx-tabs::-webkit-scrollbar { display: none; }
.gx-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: var(--bg-card);
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}
.gx-tab:hover { border-color: var(--primary); color: var(--text); }
.gx-tab.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Shared panel animation */
.g-panel {
  animation: gx-slide .25s ease;
}
@keyframes gx-slide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Section head */
.gx-section-head {
  margin-bottom: 20px;
}
.gx-section-head h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  font-family: var(--font-display);
}
.gx-section-head p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ▸ Card */
.gx-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}

/* ▸ Input */
.gx-input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  color: var(--text);
  font-size: 13px;
  font-family: var(--font);
  transition: border-color .2s;
  outline: none;
  box-sizing: border-box;
}
.gx-input:focus { border-color: var(--primary); }
.gx-input::placeholder { color: var(--text-muted); }

/* ▸ Field */
.gx-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 0; }
.gx-field label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: .4px; }
.gx-field--sm { max-width: 110px; }

/* ▸ Buttons */
.gx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.gx-btn--primary { background: var(--primary); color: #fff; }
.gx-btn--primary:hover { background: var(--primary-hover); }
.gx-btn--accent {
  background: linear-gradient(135deg, var(--primary), var(--fluenk-accent));
  color: #fff;
}
.gx-btn--accent:hover { opacity: .9; }
.gx-btn--ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.gx-btn--ghost:hover { border-color: var(--primary); color: var(--primary); }
.gx-btn--outline {
  background: transparent;
  border: 1px solid var(--primary);
  color: var(--primary);
}
.gx-btn--outline:hover { background: var(--primary-bg); }
.gx-btn--muted {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.gx-btn--icon { padding: 9px; }
.gx-btn--sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }

/* ============ BADGES v2 ============ */

.gx-badge-progress {
  background: var(--bg-elevated);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--text-muted);
}
.gx-badge-progress-bar {
  flex: 1;
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  overflow: hidden;
}
.gx-badge-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--fluenk-accent));
  border-radius: 4px;
  transition: width .6s ease;
}
.gx-badge-progress-txt {
  font-weight: 700;
  color: var(--text);
  font-size: 13px;
  white-space: nowrap;
}

.g-badges {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.gam-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  transition: all .25s;
  position: relative;
  overflow: hidden;
}
.gam-badge.unlocked {
  border-color: rgba(13,148,136,.3);
  background: linear-gradient(135deg, rgba(13,148,136,.03), rgba(6,182,212,.03));
}
.gam-badge.unlocked:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(13,148,136,.08);
  transform: translateY(-1px);
}
.gam-badge.locked { opacity: .3; filter: grayscale(.9); }
.gam-badge-icon {
  font-size: 28px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: 14px;
  flex-shrink: 0;
}
.gam-badge.unlocked .gam-badge-icon {
  background: linear-gradient(135deg, rgba(13,148,136,.12), rgba(6,182,212,.08));
}
.gam-badge-info { flex: 1; min-width: 0; }
.gam-badge-name { font-weight: 700; font-size: 13px; color: var(--text); line-height: 1.2; }
.gam-badge-desc { font-size: 11px; color: var(--text-muted); margin-top: 2px; line-height: 1.3; }
.gam-badge-reward {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  color: var(--primary);
  font-weight: 700;
  margin-top: 4px;
  background: var(--primary-bg);
  padding: 2px 8px;
  border-radius: 6px;
}
.gam-badge-date { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.gam-badge-seasonal-tag {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 9px;
  padding: 2px 8px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,193,7,.15), rgba(255,152,0,.1));
  color: #b8860b;
  font-weight: 700;
  letter-spacing: .2px;
}

/* ============ PREDICTIONS v2 ============ */

.gx-pred-form { margin-bottom: 16px; }
.gx-pred-form-grid {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
}
.gam-pred-list { display: flex; flex-direction: column; gap: 8px; }
.gam-pred-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  transition: all .2s;
}
.gam-pred-item:hover {
  border-color: rgba(13,148,136,.3);
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.gam-pred-status {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.gam-pred-status.pending { background: rgba(255,193,7,.1); }
.gam-pred-status.won { background: rgba(34,197,94,.1); }
.gam-pred-status.lost { background: rgba(239,68,68,.1); }
.gam-pred-info { flex: 1; min-width: 0; }
.gam-pred-main { font-weight: 600; font-size: 13px; color: var(--text); }
.gam-pred-detail { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.gam-pred-bet {
  font-weight: 800;
  font-size: 14px;
  color: var(--primary);
  white-space: nowrap;
  font-family: var(--font-display);
}

/* Prediction stats */
.pred-stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 6px;
  margin-bottom: 16px;
}
.pred-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
}
.pred-stat-value {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--text);
  font-family: var(--font-display);
  line-height: 1;
}
.pred-stat-label { font-size: 10px; color: var(--text-muted); font-weight: 500; margin-top: 3px; }

/* Prediction notifications */
.gam-pred-notifs { margin-bottom: 12px; }
.pred-notif-header {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.pred-notif-item {
  background: var(--bg-card);
  border: 1px solid rgba(13,148,136,.2);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 6px;
}
.pred-notif-msg { font-size: 13px; color: var(--text); }
.pred-notif-meta { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.pred-notif-credits { font-size: 12px; font-weight: 700; }
.pred-notif-credits.positive { color: var(--primary); }
.pred-notif-credits.negative { color: #ef4444; }
.pred-notif-dismiss {
  font-size: 11px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  cursor: pointer;
  color: var(--text-muted);
}
.pred-notif-dismiss:hover { border-color: var(--primary); color: var(--primary); }

/* ============ SHOP v2 ============ */

.gx-shop-cat { margin-bottom: 24px; }
.gx-shop-cat h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gx-shop-cat-icon { font-size: 16px; }
.g-shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.shop-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s;
}
.shop-item:hover {
  border-color: rgba(13,148,136,.3);
  box-shadow: 0 2px 12px rgba(0,0,0,.04);
}
.shop-item.active {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(13,148,136,.03), transparent);
  box-shadow: 0 0 0 1px var(--primary);
}
.shop-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shop-item-icon { font-size: 26px; flex-shrink: 0; }
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name { font-weight: 700; font-size: 13px; color: var(--text); }
.shop-item-desc { font-size: 11px; color: var(--text-muted); line-height: 1.3; margin-top: 1px; }
.shop-item-bottom { display: flex; justify-content: flex-end; }
.shop-color-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.shop-frame-preview {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--text);
  flex-shrink: 0;
  background: var(--bg-elevated);
}
.shop-frame-gold { border: 3px solid #ffd700; box-shadow: 0 0 10px rgba(255,215,0,.3); }
.shop-frame-diamond { border: 3px solid #b9f2ff; box-shadow: 0 0 10px rgba(185,242,255,.35); }
.shop-frame-fire { border: 3px solid #ff6b35; box-shadow: 0 0 10px rgba(255,107,53,.3); }
.shop-frame-neon { border: 3px solid #39ff14; box-shadow: 0 0 10px rgba(57,255,20,.3); }
.shop-buy-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--fluenk-accent));
  color: #fff;
  cursor: pointer;
  transition: all .15s;
}
.shop-buy-btn:hover { opacity: .88; transform: translateY(-1px); }
.shop-equip-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--primary);
  border-radius: 10px;
  background: transparent;
  color: var(--primary);
  cursor: pointer;
  transition: all .15s;
}
.shop-equip-btn:hover { background: var(--primary-bg); }
.shop-unequip-btn {
  padding: 7px 16px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}
.shop-unequip-btn:hover { border-color: #ef4444; color: #ef4444; }
.shop-owned-label {
  font-size: 12px;
  color: var(--primary);
  font-weight: 700;
  background: var(--primary-bg);
  padding: 4px 10px;
  border-radius: 8px;
}

/* ============ REFERRAL v2 ============ */

.gx-ref-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.gx-ref-card { display: flex; flex-direction: column; gap: 10px; }
.gx-ref-card--stat {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.gx-ref-stat-icon { font-size: 28px; }
.gx-ref-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  letter-spacing: .4px;
}
.gx-ref-link-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.gx-ref-link-row .gx-input { flex: 1; font-size: 12px; }
.gx-ref-code-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.gx-ref-code {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 4px;
  color: var(--primary);
  font-family: var(--font-display);
  background: var(--bg-elevated);
  padding: 8px 18px;
  border: 2px dashed rgba(13,148,136,.3);
  border-radius: 12px;
}

/* ============ LEADERBOARD v2 ============ */

.gam-leaderboard { display: flex; flex-direction: column; gap: 6px; }
.gam-lb-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px 16px;
  transition: all .2s;
  cursor: pointer;
}
.gam-lb-row:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.03);
}
.gam-lb-row:nth-child(1) {
  border-color: var(--gold);
  background: linear-gradient(135deg, rgba(255,210,51,.06), transparent);
}
.gam-lb-row:nth-child(2) { border-color: var(--silver); }
.gam-lb-row:nth-child(3) { border-color: #cd7f32; }
.gam-lb-rank {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 14px;
  color: var(--text);
  flex-shrink: 0;
  font-family: var(--font-display);
}
.gam-lb-name { flex: 1; font-weight: 600; font-size: 14px; color: var(--text); }
.gam-lb-credits { font-weight: 800; font-size: 14px; color: var(--primary); font-family: var(--font-display); }
.gam-lb-badges { font-size: 12px; color: var(--text-muted); margin-left: 6px; }

/* ============ HISTORY v2 ============ */

.gam-history-list { display: flex; flex-direction: column; gap: 4px; }
.gam-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 13px;
  transition: border-color .2s;
}
.gam-history-item:hover { border-color: var(--border-light); }
.gam-history-reason { color: var(--text); flex: 1; }
.gam-history-amount { font-weight: 800; white-space: nowrap; margin-left: 12px; font-size: 14px; font-family: var(--font-display); }
.gam-history-amount.positive { color: var(--primary); }
.gam-history-amount.negative { color: #ef4444; }
.gam-history-date { font-size: 11px; color: var(--text-muted); margin-left: 12px; white-space: nowrap; }

/* ============ SETTINGS (email + alerts) v2 ============ */

.gx-settings-block { margin-bottom: 28px; }
.gx-settings-block h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}
.gx-settings-form {
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Toggle switch */
.gx-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
}
.gx-toggle input { display: none; }
.gx-toggle-slider {
  width: 40px;
  height: 22px;
  background: var(--border);
  border-radius: 11px;
  position: relative;
  transition: background .2s;
  flex-shrink: 0;
}
.gx-toggle-slider::after {
  content: '';
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
.gx-toggle input:checked + .gx-toggle-slider { background: var(--primary); }
.gx-toggle input:checked + .gx-toggle-slider::after { transform: translateX(18px); }
.gx-toggle-text { font-weight: 500; }

/* Alert form */
.gx-alert-form-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: end;
}
.alerts-list { display: flex; flex-direction: column; gap: 6px; }
.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13px;
  transition: border-color .2s;
}
.alert-item:hover { border-color: var(--border-light); }
.alert-item-info { flex: 1; }
.alert-item-name { font-weight: 700; color: var(--text); font-size: 13px; }
.alert-item-type { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.alert-item-triggered { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.btn-alert-delete {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.btn-alert-delete:hover { border-color: #ef4444; color: #ef4444; }

/* Badge toast notification (popup) */
.badge-toast {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0,0,0,.12);
  animation: badge-toast-in .4s ease;
  min-width: 260px;
}
.badge-toast-icon { font-size: 32px; }
.badge-toast-text { font-size: 13px; color: var(--text); line-height: 1.4; }
@keyframes badge-toast-in {
  from { transform: translateY(20px) scale(.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* ============ GAMIFICATION RESPONSIVE ============ */

@media (max-width: 768px) {
  .gx-wrap { padding: 12px 12px 40px; }
  .gx-hero { padding: 20px 16px 16px; border-radius: 16px; }
  .gx-hero-inner { gap: 14px; }
  .gx-hero-avatar { width: 56px; height: 56px; }
  .gx-hero-letter { font-size: 22px; }
  .gx-hero-name { font-size: 17px; }
  .gx-hero-stats { padding: 10px 0; }
  .gx-hs-val { font-size: 18px; }
  .gx-tab { padding: 7px 14px; font-size: 12px; }
  .g-badges { grid-template-columns: 1fr; }
  .gx-pred-form-grid { flex-direction: column; }
  .gx-field--sm { max-width: none; }
  .g-shop-grid { grid-template-columns: 1fr; }
  .gx-ref-cards { grid-template-columns: 1fr; }
  .gx-alert-form-grid { flex-direction: column; }
  .pred-stats-bar { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 400px) {
  .gx-hero-level { flex-wrap: wrap; }
  .gx-hs-val { font-size: 16px; }
  .gx-section-head h2 { font-size: 1.1rem; }
  .pred-stats-bar { grid-template-columns: repeat(2, 1fr); }
}

/* ============ FAQ ============ */

.faq-container {
  max-width: 780px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

/* Hero */
.faq-hero {
  text-align: center;
  padding: 48px 0 28px;
}
.faq-hero h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  margin: 0;
}
.faq-subtitle {
  font-size: 1rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* Search */
.faq-search-wrap {
  position: relative;
  margin-bottom: 20px;
}
.faq-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.faq-search {
  width: 100%;
  padding: 12px 14px 12px 42px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  box-sizing: border-box;
}
.faq-search:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb, 99,102,241), .12);
}
.faq-search::placeholder { color: var(--text-muted); opacity: .6; }

/* Category pills */
.faq-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  justify-content: center;
}
.faq-cat {
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--bg-elevated, var(--bg-card));
  border: 1px solid var(--border);
  border-radius: 20px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.faq-cat:hover { border-color: var(--primary); color: var(--primary); }
.faq-cat.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Section title */
.faq-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  padding: 24px 0 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.faq-section-icon { font-size: 1rem; }

/* Group (for filtering) */
.faq-group { display: block; }
.faq-group.hidden { display: none; }

/* Item card */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 8px;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
  cursor: pointer;
}
.faq-item:hover {
  border-color: rgba(13, 148, 136, 0.40);
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.faq-item.hidden { display: none; }

/* Question row */
.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  user-select: none;
}
.faq-question span { flex: 1; }

/* Chevron */
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .25s ease, color .2s;
}
.faq-item.open .faq-chevron {
  transform: rotate(180deg);
  color: var(--primary);
}

/* Answer — animated collapse */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s cubic-bezier(.4,0,.2,1);
}
.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer-inner {
  padding: 0 18px 18px;
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-secondary, var(--text-muted));
}
.faq-answer-inner ul {
  margin: 10px 0;
  padding-left: 18px;
}
.faq-answer-inner li {
  margin-bottom: 4px;
}
.faq-answer-inner code {
  background: var(--bg-elevated, var(--bg-card));
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .85em;
  border: 1px solid var(--border);
}

/* No results */
.faq-no-results {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}
.faq-no-results p {
  margin-top: 12px;
  font-size: .95rem;
}

/* Mobile */
@media (max-width: 640px) {
  .faq-container { padding: 0 12px 40px; }
  .faq-hero { padding: 32px 0 20px; }
  .faq-hero h1 { font-size: 1.8rem; }
  .faq-question { padding: 14px 14px; font-size: .9rem; }
  .faq-answer-inner { padding: 0 14px 14px; font-size: .85rem; }
  .faq-cats { gap: 6px; }
  .faq-cat { padding: 5px 12px; font-size: .78rem; }
}

/* ====================================================================
   COMPREHENSIVE MOBILE / TABLET RESPONSIVE FIXES
   ==================================================================== */

/* --- Tablet  (≤ 768px) — compare, stats, profile, simulator, gamification --- */
@media (max-width: 768px) {
  /* Compare */
  .compare-header h1 { font-size: 22px; }
  .compare-subtitle { font-size: 13px; }
  .compare-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
  .compare-card { padding: 18px; }

  /* Stats */
  .stats-header h1 { font-size: 22px; }
  .stats-subtitle { font-size: 13px; }
  .stats-section { padding: 18px; }
  .stat-card { padding: 16px; }
  .stat-card-value { font-size: 24px; }
  .stats-band-bars { height: 110px; }

  /* Profile */
  .profile-hero { padding: 24px; gap: 18px; margin-top: 30px; }
  .profile-history { padding: 18px; }

  /* Simulator */
  .sim-hero h1 { font-size: 2rem; }
  .sim-formula-card { padding: 1rem 1.2rem; }
  .sim-result-section { padding: 1.2rem; }

  /* Compare floating bar */
  .compare-bar { padding: 8px 14px; gap: 10px; }
  .compare-bar-text { font-size: 12px; }
}

/* --- Small screens (≤ 640px) — enhanced layout shifts --- */
@media (max-width: 640px) {
  /* Compare */
  .compare-header { padding: 0 14px; }
  .compare-header h1 { font-size: 20px; }
  .compare-container { padding: 0 14px; }
  .compare-card { padding: 16px; }
  .compare-card-avatar,
  .compare-card-avatar.default-avatar { width: 52px; height: 52px; font-size: 22px; }
  .compare-card-name { font-size: 14px; }

  /* Stats */
  .stats-header { padding: 0 14px 20px; }
  .stats-container { padding: 0 14px; }
  .stat-card-value { font-size: 22px; }
  .stats-section { padding: 16px; }
  .stats-section-title { font-size: 14px; }
  .stats-band-bars { height: 100px; gap: 6px; }

  /* Profile */
  .profile-container { padding: 44px 14px 0; }
  .profile-hero { padding: 20px; margin-top: 30px;}
  .profile-metric-box { padding: 10px 14px; min-width: 80px; }
  .profile-metric-value { font-size: 18px; }
  .profile-platforms { grid-template-columns: 1fr; }
  .profile-history { padding: 16px; }

  /* Compare floating bar — full width */
  .compare-bar {
    left: 12px; right: 12px;
    transform: none;
    bottom: 16px;
    padding: 8px 12px;
    gap: 8px;
  }
  .compare-bar-text { font-size: 12px; }
  .compare-bar-btn { padding: 6px 14px !important; font-size: 12px !important; }

  /* User profile card */
  .user-profile-card { margin: 12px 8px; }
  .user-profile-header { padding: 18px; gap: 12px; }
  .user-profile-stats { padding: 14px 16px; gap: 8px; }
  .user-profile-stat { min-width: 70px; padding: 8px; }
}

/* --- Smartphone (≤ 480px) — aggressive scaling --- */
@media (max-width: 480px) {
  /* Compare */
  .compare-header h1 { font-size: 18px; }
  .compare-subtitle { font-size: 12px; }
  .compare-grid { grid-template-columns: 1fr; gap: 12px; }
  .compare-card { padding: 14px; }
  .compare-card-avatar,
  .compare-card-avatar.default-avatar { width: 48px; height: 48px; font-size: 20px; }
  .compare-metric-row { font-size: 12px; padding: 6px 0; }
  .compare-charts-section { gap: 14px; }
  .compare-chart-box { padding: 14px; }

  /* Stats */
  .stats-header h1 { font-size: 18px; }
  .stats-subtitle { font-size: 12px; }
  .stats-overview { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card-icon { width: 36px; height: 36px; border-radius: 10px; margin-bottom: 8px; }
  .stat-card-value { font-size: 20px; }
  .stat-card-label { font-size: 11px; }
  .stats-section { padding: 14px; margin-bottom: 14px; }
  .stats-section-title { font-size: 13px; margin-bottom: 12px; }
  .stats-band-bars { height: 90px; gap: 4px; padding: 0 4px; }
  .stats-band-label { font-size: 9px; }
  .stats-band-count { font-size: 11px; }
  .stats-platform-row { gap: 10px; padding: 10px 0; }
  .stats-platform-icon { width: 30px; height: 30px; font-size: 14px; border-radius: 8px; }
  .stats-platform-name { font-size: 13px; }
  .stats-platform-followers { font-size: 13px; }
  .stats-platform-bar-wrap { display: none; }
  .stats-period-btn { padding: 5px 12px; font-size: 0.75rem; }

  /* Profile */
  .profile-hero { padding: 16px; margin-top: 30px;}
  .profile-name { font-size: 20px; }
  .profile-handle { font-size: 13px; }
  .profile-bio { font-size: 13px; }
  .profile-metrics { gap: 8px; }
  .profile-metric-box { padding: 8px 10px; min-width: 70px; }
  .profile-metric-value { font-size: 16px; }
  .profile-metric-label { font-size: 10px; }
  .profile-section-title { font-size: 14px; color: var(--forest); }
  .profile-platform-card { padding: 12px; gap: 10px; }
  .profile-platform-icon { width: 34px; height: 34px; font-size: 15px; }
  .profile-platform-followers { font-size: 14px; }
  .profile-history { padding: 14px; }
  .profile-chart-wrap { height: 200px; padding: 8px; }

  /* Notification dropdown — full-width fixed */
  .notif-dropdown {
    position: fixed;
    top: var(--header-h);
    left: 6px;
    right: 6px;
    width: auto;
    border-radius: 10px;
  }
  .notif-item { padding: 8px 12px; gap: 8px; font-size: 12px; }
  .notif-dropdown-header { padding: 10px 12px; font-size: 13px; }

  /* Compare floating bar */
  .compare-bar {
    left: 8px; right: 8px;
    transform: none;
    bottom: 12px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 8px 10px;
    gap: 6px;
  }

  /* Simulator */
  .sim-page { padding: 0 8px; }
  .sim-formula-card { padding: 1rem; }
  .sim-formula-eq { font-size: 11px; line-height: 2; }
  .sim-pl-card { padding: 0.85rem 1rem; }
  .sim-input-row label { min-width: 65px; font-size: 10px; }
  .sim-result-section { padding: 1rem; }
  .sim-bands-row { border-radius: 6px; }
  .sim-band-seg { padding: 4px 2px; font-size: 8px; }
  .sim-step { padding: 0.5rem 0.8rem; font-size: 11px; }
  .sim-breakdown h2 { font-size: 10px; }
  .sim-presets-header h2 { font-size: 0.95rem; }
  .sim-preset-card { padding: 10px 12px; }
  .sim-preset-name { font-size: 0.85rem; }

  /* Gamification */
  .gam-header h1 { font-size: 1.5rem; }
  .gam-subtitle { font-size: 12px; }
  .gam-stat-card { padding: 12px 14px; gap: 10px; }
  .gam-stat-icon { width: 36px; height: 36px; font-size: 24px; border-radius: 10px; }
  .gam-stat-num { font-size: 1.3rem; }
  .gam-stat-label { font-size: 0.72rem; }
  .gam-badge { padding: 12px 14px; gap: 10px; }
  .gam-badge-icon { width: 36px; height: 36px; font-size: 24px; border-radius: 10px; }
  .gam-badge-name { font-size: 13px; }
  .gam-pred-form { padding: 16px; }
  .gam-pred-form-header h3 { font-size: 14px; }
  .gam-pred-item { padding: 10px 14px; gap: 10px; }
  .gam-pred-status { width: 30px; height: 30px; font-size: 14px; }
  .gam-pred-main { font-size: 13px; }
  .gam-pred-bet { font-size: 13px; }
  .gam-referral-card { padding: 20px 16px; }
  .gam-lb-row { padding: 10px 14px; gap: 10px; }
  .gam-lb-rank { width: 28px; height: 28px; font-size: 12px; }
  .gam-lb-name { font-size: 13px; }
  .gam-lb-credits { font-size: 13px; }
  .gam-history-item { padding: 8px 12px; font-size: 12px; }
  .gam-history-amount { font-size: 13px; margin-left: 8px; }
  .gam-history-date { font-size: 10px; margin-left: 8px; }
  .gam-section-title { font-size: 13px; }

  /* Email settings */
  .gam-email-card { padding: 20px 16px; }
  .gam-email-card h3 { font-size: 1rem; }
  .gam-email-card p { font-size: 0.82rem; }

  /* User profile card */
  .user-profile-card { margin: 12px 6px; padding-top: 40px; }
  .user-profile-header { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .user-profile-avatar { width: 44px; height: 44px; font-size: 1.1rem; }
  .user-profile-name { font-size: 1rem; }
  .user-profile-pos { font-size: 1.1rem; }
  .user-profile-stats { padding: 14px 12px; gap: 8px; }
  .user-profile-stat { min-width: 70px; padding: 8px; }
  .user-profile-stat-val { font-size: 0.95rem; }
  .user-profile-stat-label { font-size: 0.7rem; }
  .user-profile-badges { padding: 10px 12px 16px; gap: 6px; }

  /* Category tabs */
  .category-tabs { gap: 6px; }
  .category-pill { padding: 4px 10px; font-size: 0.72rem; }

  /* Prediction notifications */
  .pred-notif-header { padding: 10px 12px; font-size: 0.82rem; }
  .pred-notif-item { padding: 10px 12px; }
  .pred-notif-msg { font-size: 0.82rem; }
  .pred-notif-meta { gap: 8px; flex-wrap: wrap; }

  /* Export CSV */
  .btn-export-csv { padding: 6px 14px; font-size: 0.78rem; }

  /* History table scrollable */
  .profile-history { overflow-x: auto; }
  .history-table { min-width: 400px; }
  .history-table th,
  .history-table td { padding: 6px 8px; font-size: 12px; }

  /* Edit profile */
  .edit-profile-container { padding: 16px 10px 30px; }
  .edit-profile-container h1 { font-size: 18px; }
  .edit-profile-avatar { width: 80px; height: 80px; }
  .edit-profile-photo-actions .btn-secondary { font-size: 12px; padding: 7px 14px; }
}

/* --- Very small screens (≤ 360px) --- */
@media (max-width: 360px) {
  /* Compare */
  .compare-card-name { font-size: 13px; }
  .compare-card-handle { font-size: 11px; margin-bottom: 10px; }

  /* Stats */
  .stats-overview { grid-template-columns: 1fr; }
  .stat-card-value { font-size: 18px; }
  .stats-section { padding: 12px; }

  /* Simulator */
  .sim-hero h1 { font-size: 1.5rem; }
  .sim-reach-grid { grid-template-columns: 1fr; }
  .sim-result-num { font-size: 2.4rem; }
  .sim-result-top { flex-direction: column; gap: 8px; }
  .sim-band-seg { font-size: 7px; padding: 3px 1px; }

  /* Gamification */
  .gam-header h1 { font-size: 1.3rem; }
  .gam-stat-num { font-size: 1.1rem; }
  .gam-tab { padding: 8px 10px; font-size: 11px; }
  .gam-pred-form { padding: 12px; }
  .gam-referral-code { font-size: 14px; letter-spacing: 2px; padding: 5px 10px; }
  .gam-referral-card { padding: 16px 12px; }

  /* Email */
  .gam-email-card { padding: 16px 12px; }

  /* Profile */
  .profile-metric-box { padding: 6px 8px; min-width: 60px; }
  .profile-metric-value { font-size: 14px; }
  .profile-platform-card { padding: 10px; }
  .profile-platform-icon { width: 30px; height: 30px; font-size: 13px; }

  /* User profile */
  .user-profile-stat { min-width: 60px; }

  /* Notification */
  .notif-dropdown { left: 4px; right: 4px; }

  /* Compare bar */
  .compare-bar { left: 6px; right: 6px; bottom: 8px; }
}

/* ========== COSMETICS SHOP ========== */
.shop-header { margin-bottom: 24px; }
.shop-desc {
  color: var(--text-muted);
  font-size: 13px;
  margin-top: 4px;
}
.shop-section {
  margin-bottom: 28px;
}
.shop-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.shop-section-price {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}
.shop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.shop-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all .2s;
}
.shop-item:hover {
  border-color: var(--primary);
}
.shop-item.active {
  border-color: var(--primary);
  box-shadow: 0 0 14px rgba(13, 148, 136, 0.15);
}
.shop-item-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shop-item-icon {
  font-size: 28px;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 148, 136, 0.06);
  border-radius: 10px;
}
.shop-item-info { flex: 1; min-width: 0; }
.shop-item-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.shop-item-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.shop-item-bottom {
  display: flex;
  justify-content: flex-end;
}
.shop-buy-btn,
.shop-equip-btn,
.shop-unequip-btn {
  padding: 6px 14px;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.shop-buy-btn {
  background: var(--primary);
  color: white;
}
.shop-buy-btn:hover {
  filter: brightness(1.1);
}
.shop-equip-btn {
  background: rgba(13, 148, 136, 0.12);
  color: var(--primary);
}
.shop-equip-btn:hover {
  background: rgba(13, 148, 136, 0.22);
}
.shop-unequip-btn {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}
.shop-unequip-btn:hover {
  background: rgba(239, 68, 68, 0.2);
}
.shop-owned-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.shop-color-preview {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid var(--border);
}
.shop-frame-preview {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 800;
  color: white;
  background: var(--primary);
  flex-shrink: 0;
}
.shop-frame-gold {
  box-shadow: 0 0 0 3px #FFD700, 0 0 10px rgba(255,215,0,0.4);
}
.shop-frame-diamond {
  box-shadow: 0 0 0 3px #B9F2FF, 0 0 14px rgba(185,242,255,0.5);
}
.shop-frame-fire {
  box-shadow: 0 0 0 3px #FF6B35, 0 0 12px rgba(255,107,53,0.4);
}
.shop-frame-neon {
  box-shadow: 0 0 0 3px #39FF14, 0 0 14px rgba(57,255,20,0.4);
  animation: neon-pulse 2s ease-in-out infinite;
}
@keyframes neon-pulse {
  0%, 100% { box-shadow: 0 0 0 3px #39FF14, 0 0 14px rgba(57,255,20,0.4); }
  50% { box-shadow: 0 0 0 3px #39FF14, 0 0 22px rgba(57,255,20,0.6); }
}

.my-bookings-section > h2 {
  margin-top: 40px;
  margin-bottom: 16px;
  color: var(--primary) !important;
  padding-left: 20px;
}

/* Avatar frame classes — generic, works on any avatar element */
.avatar-frame-gold {
  box-shadow: 0 0 0 3px #FFD700, 0 0 12px rgba(255,215,0,0.4);
}
.avatar-frame-diamond {
  box-shadow: 0 0 0 3px #B9F2FF, 0 0 16px rgba(185,242,255,0.5);
}
.avatar-frame-fire {
  box-shadow: 0 0 0 3px #FF6B35, 0 0 14px rgba(255,107,53,0.4);
}
.avatar-frame-neon {
  box-shadow: 0 0 0 3px #39FF14, 0 0 16px rgba(57,255,20,0.4);
  animation: neon-pulse 2s ease-in-out infinite;
}

/* ---- User Profile Card (base styles) ---- */
.user-profile-card {
  max-width: 560px;
  margin: 30px auto;
  background: #fff;
  border-radius: 16px;
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.user-profile-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 16px 20px 0;
}
.user-profile-back:hover { color: var(--primary); }
.user-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}
.user-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  flex-shrink: 0;
  border: 3px solid var(--border-light);
  object-fit: cover;
}
img.user-profile-avatar {
  display: block;
}
.user-profile-info {
  flex: 1;
  min-width: 0;
}
.user-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.user-profile-joined {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}
.user-profile-bio {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  line-height: 1.4;
}
.user-profile-pos {
  font-size: 22px;
  font-weight: 800;
  color: var(--neon-lime);
  flex-shrink: 0;
}
.user-profile-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 24px 24px;
  justify-content: center;
}
.user-profile-stat {
  background: var(--bg-surface, #F8F9FA);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 90px;
  text-align: center;
  flex: 1;
}
.user-profile-stat-val {
  display: block;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.user-profile-stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}
.user-profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0 24px 20px;
}
.user-profile-badge {
  display: inline-block;
  background: rgba(6,182,212,.08);
  color: var(--fluenk-accent);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 8px;
}

.user-profile-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}

/* ========== FOOTER ========== */
.site-footer {
  text-align: center;
  padding: 24px 16px;
  font-size: 0.85rem;
  color: var(--text-secondary, #888);
  border-top: 1px solid var(--border, rgba(255,255,255,0.08));
}
.site-footer a {
  color: var(--forest);
  text-decoration: none;
  font-weight: 500;
}
.site-footer a:hover {
  text-decoration: underline;
}
.site-footer-links {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.site-footer-sep {
  margin: 0 8px;
  opacity: 0.5;
}
.site-footer-links a {
  color: var(--text-muted);
  font-weight: 400;
}
.site-footer-links a:hover {
  color: var(--primary);
  text-decoration: underline;
}

/* ==================== EVENTI v2 ==================== */

/* -- Page wrapper -- */
.ev-page {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 20px 40px;
}

/* -- Hero -- */
.ev-hero {
  text-align: center;
  padding: 36px 0 24px;
}
.ev-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  margin-bottom: 14px;
}
.ev-hero h1 {
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--text);
  margin: 0 0 8px;
  letter-spacing: -0.3px;
}
.ev-hero-sub {
  color: var(--text-secondary);
  font-size: 15px;
  margin: 0;
}

/* -- Tabs / Filtri -- */
.ev-tabs {
  display: flex;
  gap: 6px;
  justify-content: center;
  padding: 0 0 24px;
  flex-wrap: wrap;
}
.ev-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.ev-tab:hover {
  border-color: var(--neon-lime);
  color: var(--text);
}
.ev-tab.active {
  background: var(--neon-lime);
  border-color: var(--neon-lime);
  color: #fff;
}

/* -- Grid eventi -- */
.ev-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}
.ev-loader {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  padding: 40px 0;
}
.ev-bookings-wrap {
  margin-top: 8px;
}

/* -- Empty State -- */
.ev-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.ev-empty svg {
  opacity: 0.3;
  margin-bottom: 16px;
}
.ev-empty p {
  font-size: 15px;
  margin: 0;
}

/* -- Card Evento -- */
.ev-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(.4,0,.2,1), box-shadow 0.25s cubic-bezier(.4,0,.2,1);
  border: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
}
.ev-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.25);
}

/* Card: immagine */
.ev-card-img {
  position: relative;
  height: 190px;
  background-size: cover;
  background-position: center;
  background-color: var(--bg-elevated);
}
.ev-card-img-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  opacity: 0.5;
}
.ev-card-img-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to top, var(--bg-card), transparent);
  pointer-events: none;
}

/* Card: badge status sull'immagine */
.ev-card-status {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.ev-card-status.published { background: rgba(13,148,136,0.8); color: #fff; }
.ev-card-status.draft { background: rgba(100,100,100,0.7); color: #ddd; }
.ev-card-status.cancelled { background: rgba(255,58,92,0.8); color: #fff; }
.ev-card-status.completed { background: rgba(34,255,110,0.25); color: #22FF6E; }

/* Card: body */
.ev-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.ev-card-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.3;
}

/* Card: meta row */
.ev-card-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.ev-card-meta-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
}
.ev-card-meta-row svg {
  flex-shrink: 0;
  opacity: 0.65;
}

/* Card: footer */
.ev-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ev-card-spots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--neon-lime);
}
.ev-card-spots svg {
  flex-shrink: 0;
}
.ev-card-arrow {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background 0.2s, color 0.2s;
}
.ev-card:hover .ev-card-arrow {
  background: var(--neon-lime);
  color: #fff;
}

/* -- Booking Card (Le mie prenotazioni) -- */
.ev-booking-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 4px solid var(--neon-lime);
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ev-booking-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
}
.ev-booking-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.ev-booking-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ev-booking-meta span {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.ev-booking-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 100px;
  width: fit-content;
}
.ev-booking-status.confirmed {
  background: rgba(6,182,212,0.12);
  color: var(--fluenk-accent);
}
.ev-booking-status.checked-in {
  background: rgba(34,255,110,0.12);
  color: #22FF6E;
}

/* -- Event Detail v2 -- */
.ev-detail {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 16px 40px;
}
.ev-detail-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 0 16px;
  transition: color 0.2s;
}
.ev-detail-back:hover { color: var(--neon-lime); }

.ev-detail-img {
  width: 100%;
  height: 320px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
.ev-detail-img::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  background: linear-gradient(to top, var(--bg-surface), transparent);
}

.ev-detail-header {
  text-align: center;
  margin-bottom: 28px;
}
.ev-detail-header h1 {
  font-family: var(--font-display);
  font-size: 28px;
  color: var(--text);
  margin: 0 0 20px;
  letter-spacing: -0.3px;
}

/* Detail: info pills */
.ev-detail-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.ev-detail-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 100px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.06);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: border-color 0.2s;
}
.ev-detail-pill:hover { border-color: var(--neon-lime); }
.ev-detail-pill svg { opacity: 0.7; flex-shrink: 0; }

/* Detail: descrizione */
.ev-detail-desc {
  color: var(--text-secondary);
  line-height: 1.75;
  font-size: 15px;
  margin-bottom: 28px;
  text-align: center;
}

/* Detail: CTA prenotazione */
.ev-detail-cta {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,0.06);
  padding: 28px;
  text-align: center;
}
.ev-detail-cta h3 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--text);
  margin: 0 0 6px;
}
.ev-detail-cta p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 18px;
}
.ev-detail-cta textarea {
  width: 100%;
  margin-bottom: 16px;
  resize: vertical;
}
.ev-detail-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  border-radius: 100px;
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}
.ev-detail-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(13,148,136,0.35);
}

/* Detail: messaggio prenotato */
.ev-detail-booked {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(13,148,136,0.1);
  border: 1px solid rgba(13,148,136,0.25);
  padding: 18px 22px;
  border-radius: var(--radius);
  margin-top: 24px;
}
.ev-detail-booked-icon {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(13,148,136,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}
.ev-detail-booked-text {
  font-size: 14px;
  color: var(--neon-lime);
  font-weight: 600;
  line-height: 1.4;
}
.ev-detail-booked-text small {
  display: block;
  font-weight: 400;
  color: var(--text-secondary);
  font-size: 12px;
  margin-top: 4px;
}

/* Detail: login prompt */
.ev-detail-login {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 14px;
}
.ev-detail-login a {
  color: var(--neon-lime);
  font-weight: 600;
  text-decoration: none;
}
.ev-detail-login a:hover { text-decoration: underline; }

/* -- Admin: events table/list -- */
.admin-event-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 0.2s;
}
.admin-event-row:hover { border-color: rgba(255,255,255,0.12); }
.admin-event-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-event-actions {
  display: flex;
  gap: 8px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th, .admin-table td {
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-table th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Legacy compat aliases */
.event-status-badge {
  display: inline-block;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 100px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.event-status-published { background: rgba(13,148,136,0.2); color: var(--neon-lime); }
.event-status-draft { background: rgba(160,160,160,0.2); color: var(--text-muted); }
.event-status-cancelled { background: rgba(255,58,92,0.2); color: #FF3A5C; }
.event-status-completed { background: rgba(34,255,110,0.2); color: #22FF6E; }

.btn-small {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(255,255,255,0.1);
  background: var(--bg-elevated);
  color: var(--text);
  cursor: pointer;
  transition: background 0.15s;
}
.btn-small:hover { background: var(--bg-elevated); }
.btn-small.btn-danger { color: #FF3A5C; border-color: rgba(255,58,92,0.3); background: var(--bg-elevated); }
.btn-small.btn-danger:hover { background: rgba(255,58,92,0.12); }
.btn-accept { color: var(--neon-lime); border-color: rgba(13,148,136,0.3); }
.btn-accept:hover { background: rgba(13,148,136,0.15); }

/* ==================== COMMUNITY ==================== */

.community-hero {
  text-align: center;
  padding: 30px 0 20px;
}
.community-hero h1 { font-family: var(--font-display); font-size: 28px; color: var(--text); }
.community-hero h1 span { color: var(--neon-lime); }
.community-subtitle { color: var(--text-secondary); font-size: 15px; margin-top: 8px; }

.community-tabs {
  display: flex;
  gap: 4px;
  max-width: var(--max-w);
  margin: 0 auto 20px;
  padding: 0 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.community-page-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px 16px;
}
.community-sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  overflow-x: auto;
  padding: 2px;
}
.community-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  border-radius: var(--radius-xs);
}
.community-tab.active {
  color: var(--text);
  background: var(--neon-lime);
  color: #fff;
}
.community-tab:hover:not(.active) { color: var(--text); }

.community-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
}

.creators-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.creator-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.creator-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--neon-lime);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  overflow: hidden;
}
.creator-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.creator-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.creator-info strong { color: var(--text); font-size: 14px; }

.btn-friend {
  color: var(--neon-lime);
  border-color: rgba(13,148,136,0.3);
}
.btn-friend-done {
  color: var(--primary);
  border-color: rgba(13,148,136,0.2);
  cursor: default;
  font-size: 12px;
}
.btn-friend-pending {
  color: var(--text-muted);
  border-color: rgba(255,255,255,0.1);
  cursor: default;
  font-size: 12px;
}

.friend-request-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  color: var(--text);
}
.friend-request-card div { display: flex; gap: 8px; }

.creator-pill-style {
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent)) !important;
}

/* ==================== CHAT ==================== */

.chat-layout {
  display: grid;
  grid-template-columns: 320px 1fr;
  height: calc(100vh - 180px);
  min-height: 500px;
  max-height: 800px;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-light);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.06),
    0 1px 4px rgba(0,0,0,0.03);
}

/* ---- Sidebar ---- */
.chat-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-sidebar-header {
  padding: 20px 18px 14px;
  flex-shrink: 0;
}
.chat-sidebar-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 14px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
}
.chat-sidebar-header h3 svg {
  color: var(--neon-lime);
}
.chat-search-wrap {
  position: relative;
}
.chat-search-wrap input {
  width: 100%;
  padding: 10px 14px 10px 36px;
  border: 1.5px solid var(--border-light);
  border-radius: 12px;
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  box-sizing: border-box;
}
.chat-search-wrap input:focus {
  border-color: var(--neon-lime);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}
.chat-search-wrap input::placeholder {
  color: var(--text-muted);
}
.chat-search-wrap svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.chat-conv-list {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 6px 0;
}
/* Legacy fallback for elements without new wrapper */
.chat-sidebar h3 {
  padding: 14px 16px;
  font-size: 14px;
  color: var(--text);
  margin: 0;
}

/* ---- Conversation items ---- */
.chat-conv-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 18px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
  border-left: 3px solid transparent;
  position: relative;
  margin: 0 6px;
  border-radius: 12px;
}
.chat-conv-item:not(:last-child) {
  margin-bottom: 2px;
}
.chat-conv-item:hover {
  background: var(--bg-elevated);
}
.chat-conv-item.active {
  background: linear-gradient(135deg, rgba(13,148,136,0.08), rgba(6,182,212,0.06));
  border-left-color: var(--neon-lime);
  box-shadow: inset 0 0 0 1px rgba(13,148,136,0.12);
}
.chat-conv-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 16px;
  flex-shrink: 0;
  text-transform: uppercase;
  box-shadow: 0 2px 10px rgba(13,148,136,0.15);
  overflow: hidden;
  position: relative;
}
.chat-conv-avatar img,
.chat-header-avatar img,
.cdash-friend-avatar img,
.chat-msg-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 10px;
  flex-shrink: 0;
  overflow: hidden;
  align-self: flex-end;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  border: 2px solid var(--bg-elevated);
}
.chat-conv-info {
  flex: 1;
  min-width: 0;
}
.chat-conv-info strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.chat-conv-preview {
  display: block;
  font-size: 12.5px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 3px;
  line-height: 1.3;
}
.chat-conv-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.chat-unread-badge {
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 22px;
  height: 22px;
  border-radius: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(13,148,136,0.25);
}
.chat-conv-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.chat-conv-last {
  font-size: 12px; color: var(--text-muted);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-top: 2px;
}
.chat-conv-time {
  font-size: 10.5px; color: var(--text-muted); flex-shrink: 0;
  font-weight: 500;
}
.chat-conv-unread {
  background: var(--neon-lime); color: #fff;
  font-size: 10px; font-weight: 700;
  min-width: 18px; height: 18px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-left: 4px;
}

/* ---- Main chat area ---- */
.chat-main {
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  min-height: 0;
  overflow: hidden;
}
.chat-header {
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--bg-surface);
  min-height: 64px;
  box-sizing: border-box;
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 6px rgba(0,0,0,.03);
}
.chat-header-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(13,148,136,0.15);
}
.chat-header-info {
  flex: 1;
}
.chat-header-info .chat-header-name {
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  font-family: var(--font-display);
}
.chat-header-info .chat-header-status {
  font-size: 11.5px;
  color: var(--neon-lime);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
}
.chat-header-info .chat-header-status::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--neon-lime);
  box-shadow: 0 0 6px rgba(13,148,136,0.4);
  flex-shrink: 0;
}

/* Empty state when no chat is selected */
.chat-empty-state {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: var(--text-muted);
  padding: 48px 24px;
  text-align: center;
}
.chat-empty-state svg {
  opacity: 0.18;
  color: var(--neon-lime);
}
.chat-empty-state h3 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-secondary);
  margin: 0;
  font-family: var(--font-display);
}
.chat-empty-state p {
  font-size: 13.5px;
  margin: 0;
  max-width: 280px;
  line-height: 1.55;
}

/* ---- Messages area ---- */
.chat-messages {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  scrollbar-width: thin;
  background:
    radial-gradient(ellipse at 10% 30%, rgba(13,148,136,.025) 0%, transparent 50%),
    radial-gradient(ellipse at 90% 70%, rgba(6,182,212,.025) 0%, transparent 50%),
    var(--bg-elevated);
}

/* Date separator */
.chat-date-sep {
  text-align: center;
  margin: 20px 0 14px;
  position: relative;
}
.chat-date-sep::before {
  content: '';
  position: absolute;
  left: 10%;
  right: 10%;
  top: 50%;
  height: 1px;
  background: var(--border-light);
}
.chat-date-sep span {
  background: var(--bg-elevated);
  padding: 5px 18px;
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 20px;
  border: 1px solid var(--border-light);
  position: relative;
  z-index: 1;
  letter-spacing: .4px;
  text-transform: uppercase;
}

/* ---- Message bubbles ---- */
.chat-msg {
  display: flex;
  padding: 2px 0;
  animation: chatMsgIn 0.28s cubic-bezier(.22,.68,0,1.1);
}
@keyframes chatMsgIn {
  from { opacity: 0; transform: translateY(8px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-msg-mine { justify-content: flex-end; }
.chat-msg-other { justify-content: flex-start; align-items: flex-end; gap: 8px; }

.chat-msg-bubble {
  max-width: 65%;
  padding: 10px 16px 8px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.55;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* — My messages — */
.chat-msg-mine .chat-msg-bubble {
  background: linear-gradient(145deg, var(--neon-lime) 0%, #0A7E74 100%);
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow:
    0 2px 6px rgba(13,148,136,.20),
    0 6px 20px rgba(13,148,136,.08);
}
.chat-msg-mine + .chat-msg-mine .chat-msg-bubble {
  border-top-right-radius: 8px;
}

/* — Other's messages — */
.chat-msg-other .chat-msg-bubble {
  background: var(--bg-surface);
  color: var(--text);
  border-bottom-left-radius: 6px;
  border: 1px solid var(--border-light);
  box-shadow: 0 1px 4px rgba(0,0,0,.03);
}
.chat-msg-other + .chat-msg-other .chat-msg-bubble {
  border-top-left-radius: 8px;
}

.chat-msg-sender {
  display: block;
  font-size: 11px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  letter-spacing: .2px;
}
.chat-msg-text {
  display: block;
}
.chat-msg-time {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 10px;
  margin-top: 4px;
  line-height: 1;
}
.chat-msg-mine .chat-msg-time {
  color: rgba(255,255,255,.50);
}
.chat-msg-other .chat-msg-time {
  color: var(--text-muted);
}
/* Double-tick read indicator for sent messages */
.chat-msg-mine .chat-msg-time::after {
  content: '✓✓';
  font-size: 10px;
  letter-spacing: -2px;
  margin-left: 2px;
  opacity: .65;
}

/* ---- Input area ---- */
/* Back button — hidden on desktop, shown on mobile */
.chat-back-btn { display: none; }

/* ---- Input area ---- */
.chat-input-area {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--bg-surface);
  align-items: center;
  flex-shrink: 0;
  backdrop-filter: blur(16px);
}
.chat-input-area .input {
  flex: 1;
  border-radius: 24px;
  padding: 12px 20px;
  border: 1.5px solid var(--border-light);
  background: var(--bg-elevated);
  font-size: 14px;
  color: var(--text);
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.chat-input-area .input:focus {
  border-color: var(--neon-lime);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
  outline: none;
}
.chat-input-area .input::placeholder {
  color: var(--text-muted);
}
.chat-input-area .btn-primary {
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--neon-lime), #0A7E74);
  border: none;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s;
  box-shadow:
    0 3px 12px rgba(13,148,136,.25),
    0 1px 4px rgba(0,0,0,.08);
}
.chat-input-area .btn-primary:hover {
  transform: scale(1.08) translateY(-1px);
  box-shadow:
    0 6px 24px rgba(13,148,136,.30),
    0 2px 6px rgba(0,0,0,.10);
}
.chat-input-area .btn-primary:active {
  transform: scale(0.95);
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.chat-input-area .btn-primary svg {
  color: #fff;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.12));
}

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 14px;
}

/* ==================== CREATOR DASHBOARD ==================== */

/* --- Hero v2 --- */
.cdash-hero-v2 {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 24px;
}
.cdash-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-sizing: border-box;
}
.cdash-hero-avatar-wrap { flex-shrink: 0; }
.cdash-hero-avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--primary-bg);
  border: 3px solid var(--primary);
  box-shadow: 0 0 0 4px var(--primary-glow);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.cdash-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.cdash-hero-info { flex: 1; min-width: 0; overflow: hidden; }
.cdash-hero-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdash-hero-handle {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
  margin-bottom: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cdash-hero-stat-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.cdash-hero-stat {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.cdash-hero-stat--score {
  background: var(--primary-bg);
  border-color: var(--primary-glow);
  color: var(--primary);
}

/* --- Tab nav (sticky) --- */
.cdash-tab-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  overflow: hidden;
}
.cdash-tab-nav {
  display: flex;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  gap: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cdash-tab-nav::-webkit-scrollbar { display: none; }
.cdash-tab {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 13px 16px;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  white-space: nowrap;
  font-family: var(--font);
  margin-bottom: -1px;
  flex-shrink: 0;
}
.cdash-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.cdash-tab:hover:not(.active) { color: var(--text); }
.cdash-tab svg { flex-shrink: 0; }

/* --- Panels --- */
.cdash-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 28px 24px 48px;
  box-sizing: border-box;
  overflow: hidden;
}
.cdash-loading { text-align: center; color: var(--text-muted); padding: 40px 0; }

/* ---- Creator Dashboard sub-tabs (Lavoro, Vetrina) ---- */
.cd-sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.cd-sub-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  font-family: var(--font);
}
.cd-sub-tab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.cd-sub-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}

/* ---- Creator tool grid & detail ---- */
.cd-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.cd-tool-detail { animation: fadeIn .2s; }
.cd-tool-pane { animation: fadeIn .15s; }

@media (max-width: 600px) {
  .cd-sub-tabs { flex-wrap: wrap; }
  .cd-tool-grid { grid-template-columns: 1fr; }
}

/* --- Panel toolbar (replaces cdash-portfolio-header) --- */
.cdash-panel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.cdash-panel-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

/* --- In-panel sections (scoretips, co-campaign, collaborations embedded) --- */
.cdash-inpanel-section {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 22px;
  box-sizing: border-box;
  overflow: hidden;
}
.cdash-inpanel-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cdash-inpanel-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* --- Community panel sub-nav --- */
.cdash-community-subnav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.cdash-community-subnav::-webkit-scrollbar { display: none; }
.cdash-subnav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px;
  border: none; border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px; font-weight: 500;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  font-family: var(--font);
  margin-bottom: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.cdash-subnav-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.cdash-subnav-btn:hover:not(.active) { color: var(--text); }
.cdash-community-section { padding-top: 4px; }

/* Stats cards */
.cdash-ranking-card {
  background: white; border-radius: var(--radius-md); padding: 24px;
  margin-bottom: 16px; border: 1px solid var(--border-light);
  border-top: 3px solid var(--primary);
}
.cdash-ranking-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px;
}
.cdash-ranking-avatar {
  width: 80px; height: 80px; border-radius: 50%; overflow: hidden;
  background: var(--bg-card); flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 3px solid var(--primary); box-shadow: 0 0 0 4px var(--primary-glow);
}
.cdash-ranking-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cdash-avatar-fallback { opacity: 0.45; }
.cdash-ranking-info { flex: 1; min-width: 0; overflow: hidden; }
.cdash-ranking-info h2 { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdash-ranking-info .cdash-rank { font-size: 14px; color: var(--neon-lime); font-weight: 600; }
.cdash-ranking-info .cdash-rank-delta {
  font-size: 12px; margin-left: 8px; font-weight: 600;
}
.cdash-rank-delta.positive { color: #22c55e; }
.cdash-rank-delta.negative { color: #ef4444; }
.cdash-rank-delta.neutral { color: var(--text-muted); }

.cdash-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px;
  margin-bottom: 16px;
}
.cdash-stat-box {
  background: white; border-radius: var(--radius-sm); padding: 16px; text-align: center;
  border-top: 3px solid transparent;
}
.cdash-stat-box .stat-value { font-size: 22px; font-weight: 700; color: var(--text); }
.cdash-stat-box .stat-label { font-size: 12px; color: var(--text-secondary); margin-top: 4px; word-break: break-word; }

/* Stat box accent colors */
.cdash-stat-box--score { border-top-color: var(--primary); }
.cdash-stat-box--score .stat-value { color: var(--primary); }

.cdash-stat-box--followers { border-top-color: #3B82F6; }
.cdash-stat-box--followers .stat-value { color: #3B82F6; }

.cdash-stat-box--er { border-top-color: #F59E0B; }
.cdash-stat-box--er .stat-value { color: #F59E0B; }

.cdash-stat-box--platforms { border-top-color: #8B5CF6; }
.cdash-stat-box--platforms .stat-value { color: #8B5CF6; }

/* Growth section */
.cdash-growth-section { margin-top: 20px; }
.cdash-section-title {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin-bottom: 12px; padding-bottom: 8px;
  border-bottom: 2px solid var(--primary-glow);
}
.cdash-growth-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.cdash-growth-card {
  background: white; border-radius: var(--radius-sm); padding: 16px;
  text-align: center; border: 1px solid var(--border-light);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cdash-growth-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cdash-growth-val {
  font-size: 24px; font-weight: 700; margin-bottom: 4px;
}
.cdash-growth-val.up { color: #22c55e; }
.cdash-growth-val.down { color: #ef4444; }
.cdash-growth-lbl { font-size: 12px; color: var(--text-secondary); font-weight: 500; }

/* Platform cards grid */
.cdash-platforms-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px; margin-top: 16px;
}
@media (max-width: 600px) {
  .cdash-platforms-grid { grid-template-columns: 1fr; }
  .cdash-growth-grid { grid-template-columns: 1fr 1fr; }
}

/* Hero stat variants */
.cdash-hero-stat--up { background: rgba(34, 197, 94, 0.1); border-color: rgba(34, 197, 94, 0.3); color: #16a34a; }
.cdash-hero-stat--down { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: #dc2626; }
.cdash-rank-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Quick Stats Grid */
.cdash-quick-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-top: 16px;
}
.cdash-quick-stat-card {
  background: white; border-radius: var(--radius-sm); padding: 20px;
  text-align: center; border: 1px solid var(--border-light);
  transition: transform 0.2s, box-shadow 0.2s;
}
.cdash-quick-stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.cdash-quick-stat-label {
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
  text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px;
}
.cdash-quality-ring { display: flex; justify-content: center; margin-bottom: 8px; }
.cdash-quality-ring svg { max-width: 100%; height: auto; }
.cdash-quick-stat-sub {
  font-size: 13px; color: var(--text-secondary); margin-top: 8px;
  font-weight: 500;
}
.cdash-best-time-val {
  font-size: 32px; font-weight: 700; color: var(--primary);
  margin: 12px 0 4px;
}
.cdash-best-time-day {
  font-size: 14px; color: var(--text-secondary); font-weight: 500;
}

@media (max-width: 600px) {
  .cdash-quick-stats-grid { grid-template-columns: 1fr; }
}

/* Platform badge colors */
.cdash-platforms-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.cdash-platform-badge {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  background: var(--bg-card); font-size: 13px; color: var(--text);
  border-left: 3px solid transparent;
}
.cdash-platform-badge[data-type="instagram"] { border-left-color: #E1306C; }
.cdash-platform-badge[data-type="youtube"]   { border-left-color: #FF0000; }
.cdash-platform-badge[data-type="tiktok"]    { border-left-color: #69C9D0; }
.cdash-platform-badge[data-type="x"]         { border-left-color: #888; }
.cdash-platform-badge[data-type="facebook"]  { border-left-color: #1877F2; }
.cdash-platform-badge[data-type="twitch"]    { border-left-color: #9146FF; }
.cdash-platform-badge .plat-followers { font-weight: 700; color: var(--primary); }

.cdash-no-ranking {
  text-align: center; padding: 40px 20px; color: var(--text-secondary);
  background: var(--bg-surface); border-radius: var(--radius-md);
  border: 1px solid rgba(255,255,255,0.06);
}
.cdash-no-ranking svg { margin-bottom: 12px; opacity: 0.4; }
.cdash-no-ranking h3 { font-size: 18px; color: var(--text); margin-bottom: 8px; }

/* Event cards */
.cdash-events-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.cdash-event-card {
  background: var(--bg-surface); border-radius: 30px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.06); transition: transform .15s;
}
.cdash-event-card:hover { transform: translateY(-2px); }
.cdash-event-img { width: 100%; height: 140px; object-fit: cover; background: var(--bg-card); }
.cdash-event-body { padding: 16px; }
.cdash-event-body h3 { font-size: 16px; color: var(--text); margin: 0 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cdash-event-meta { display: flex; flex-direction: column; gap: 4px; }
.cdash-event-meta span { font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
.cdash-event-status {
  display: inline-block; margin-top: 10px; padding: 4px 10px;
  border-radius: var(--radius-xs); font-size: 11px; font-weight: 600;
  text-transform: uppercase;
}
.cdash-event-status.upcoming { background: rgba(var(--neon-lime-rgb, 163,230,53), 0.15); color: var(--neon-lime); }
.cdash-event-status.completed { background: rgba(100,100,100,0.2); color: var(--text-muted); }
.cdash-event-status.checkedin { background: rgba(34,197,94,0.15); color: #22c55e; }

/* Available event cards */
.cdash-event-available { cursor: pointer; border-color: rgba(var(--neon-lime-rgb, 163,230,53), 0.18); }
.cdash-event-available:hover { border-color: var(--neon-lime); }
.cdash-event-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }
.cdash-event-spots { font-size: 12px; color: var(--text-muted); font-weight: 500; }
.cdash-btn-book {
  padding: 7px 18px; border: none; border-radius: var(--radius-xs);
  background: var(--neon-lime); color: #fff; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: filter .2s;
}
.cdash-btn-book:hover { filter: brightness(1.15); }
.cdash-btn-book:disabled { opacity: .5; cursor: not-allowed; }

/* Friends */
.cdash-friends-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.cdash-friend-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-surface); border-radius: var(--radius-md); padding: 16px;
  border: 1px solid rgba(255,255,255,0.06);
}
.cdash-friend-avatar {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--bg-card); display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-weight: 700; font-size: 18px; flex-shrink: 0;
  overflow: hidden;
}
.cdash-friend-info { flex: 1; }
.cdash-friend-info .name { font-weight: 600; color: var(--text); font-size: 14px; }
.cdash-friend-info .status { font-size: 12px; color: var(--text-muted); }
.cdash-friend-actions { display: flex; gap: 6px; }
.cdash-friend-actions button {
  padding: 6px 12px; border: none; border-radius: var(--radius-xs);
  font-size: 12px; font-weight: 600; cursor: pointer; transition: background .2s;
}
.cdash-btn-chat { background: var(--neon-lime); color: #fff; }
.cdash-btn-chat:hover { filter: brightness(1.15); }
.cdash-btn-remove { background: rgba(239,68,68,0.15); color: #ef4444; }
.cdash-btn-remove:hover { background: rgba(239,68,68,0.25); }

.cdash-section-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 20px 0 12px; display: flex; align-items: center; gap: 8px; }
.cdash-section-title .count { font-size: 13px; color: var(--text-muted); font-weight: 400; }

.cdash-pending-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-surface); border-radius: var(--radius-md); padding: 14px 16px;
  border: 1px solid rgba(255,255,255,0.06); margin-bottom: 8px;
}
.cdash-pending-card .name { flex: 1; font-weight: 600; color: var(--text); font-size: 14px; }
.cdash-btn-accept { background: var(--neon-lime); color: #fff; padding: 6px 14px; border: none; border-radius: var(--radius-xs); font-size: 12px; font-weight: 600; cursor: pointer; }
.cdash-btn-decline { background: rgba(239,68,68,0.15); color: #ef4444; padding: 6px 14px; border: none; border-radius: var(--radius-xs); font-size: 12px; font-weight: 600; cursor: pointer; }

/* Badges row in creator dashboard */
.cdash-badges-row {
  max-width: var(--max-w);
  margin: 0 auto 16px;
  padding: 0 20px;
}
.cdash-badges-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 10px;
}
.cdash-badges-grid {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 30px !important;
}
.cdash-badge-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 50px;
  padding: 8px 16px 8px 10px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.cdash-badge-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-color: var(--primary);
}
.cdash-badge-icon {
  font-size: 22px;
  line-height: 1;
}
.cdash-badge-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}

@media (max-width: 768px) {
  /* Events v2 */
  .ev-hero h1 { font-size: 24px; }
  .ev-hero-sub { font-size: 13px; }
  .ev-hero-icon { width: 48px; height: 48px; border-radius: 14px; }
  .ev-hero-icon svg { width: 26px; height: 26px; }
  .ev-grid { grid-template-columns: 1fr; gap: 14px; }
  .ev-card-img { height: 160px; }
  .ev-card-body { padding: 16px; }
  .ev-detail { padding: 16px 14px; }
  .ev-detail-header h1 { font-size: 22px; }
  .ev-detail-img { height: 220px; }
  .ev-detail-pills { gap: 8px; }
  .ev-detail-pill { font-size: 12px; padding: 6px 12px; }
  .ev-detail-desc { font-size: 14px; }
  .ev-detail-cta { padding: 20px; }
  .admin-event-row { flex-direction: column; gap: 8px; align-items: flex-start; }
  .admin-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Chat */
  .chat-layout { grid-template-columns: 1fr; height: auto; max-height: none; }
  .chat-sidebar { max-height: 260px; border-right: none; border-bottom: 1px solid var(--border-light); }
  .chat-sidebar.chat-sidebar-hidden { display: none; }
  .chat-main.chat-main-hidden { display: none; }
  .chat-messages { min-height: 360px; max-height: 55vh; }
  .chat-msg-bubble { max-width: 82%; }
  .chat-sidebar-header h3 { font-size: 15px; }
  .chat-input-area { padding: 12px 14px; }
  .chat-header { padding: 12px 16px; min-height: 56px; }
  .chat-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-elevated);
    border: none;
    cursor: pointer;
    flex-shrink: 0;
    color: var(--text);
    transition: background 0.15s;
  }
  .chat-back-btn:hover { background: var(--border-light); }

  /* Community */
  .community-hero h1 { font-size: 22px; }
  .community-subtitle { font-size: 13px; }
  .community-tabs { margin: 0 auto 14px; }
  .community-tab { font-size: 13px; padding: 9px 12px; }
  .creators-grid { grid-template-columns: 1fr; }
  .friend-request-card { flex-wrap: wrap; padding: 12px; }

  /* Creator Dashboard */
  .cdash-hero h1 { font-size: 22px; }
  .cdash-subtitle { font-size: 13px; }
  .cdash-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cdash-tab { font-size: 12px; padding: 8px 10px; }
  .cdash-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .cdash-events-grid { grid-template-columns: 1fr; }
  .cdash-friends-grid { grid-template-columns: 1fr; }
  .cdash-ranking-header { flex-direction: column; text-align: center; }
  .cdash-ranking-avatar { width: 64px; height: 64px; }
  .cdash-badges-row { padding: 0 14px; }
  .cdash-hero-inner { padding: 0 16px; gap: 16px; }
  .cdash-hero-name { font-size: 19px; }
  .cdash-panel { padding: 22px 16px 36px; }
  .cdash-inpanel-section { padding: 16px; }
  .cdash-inpanel-section-header { gap: 8px; }
  .cdash-community-subnav { gap: 2px; }
  .cdash-subnav-btn { padding: 8px 10px; font-size: 12px; }
  .cdash-camp-layout { grid-template-columns: 1fr; }

  /* Shop */
  .shop-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
  .shop-item { padding: 14px; }

  /* Alerts */
  .alerts-form-card { padding: 18px; }
  .alerts-form-row { flex-direction: column; }
  .alerts-field { min-width: 0; }
  .alert-item { flex-wrap: wrap; padding: 12px; }

  /* Share buttons */
  .share-profile-group { margin-left: 0; margin-top: 8px; }
  .btn-share-social { width: 32px; height: 32px; border-radius: 8px; }

  /* Contact modal */
  .contact-modal { padding: 20px; width: 95%; }
}

/* ==================== CONTACT INFLUENCER ==================== */
.btn-contact-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 7px 14px;
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-contact-card:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.3);
}
.btn-contact-profile {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(13, 148, 136, 0.1);
  border: 1px solid var(--primary);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-contact-profile:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
}

/* ============ Share Profile Buttons ============ */
.share-profile-group {
  display: inline-flex;
  gap: 6px;
  margin-left: 8px;
}
.btn-share-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.btn-share-social:hover { transform: translateY(-2px); }
.btn-share-whatsapp:hover { background: #25D366; color: #fff; border-color: #25D366; }
.btn-share-twitter:hover { background: #000; color: #fff; border-color: #000; }
.btn-share-telegram:hover { background: #0088cc; color: #fff; border-color: #0088cc; }
.btn-share-copy:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
.compare-share-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}
.btn-share-compare {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-xs);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-share-compare:hover { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ============ Contact Modal ============ */
.contact-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: contactFadeIn 0.2s ease;
}
@keyframes contactFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
.contact-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 90%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  animation: contactSlideUp 0.25s ease;
}
@keyframes contactSlideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.contact-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.contact-modal-header h3 {
  margin: 0;
  font-size: 1.15rem;
  color: var(--text-primary);
}
.contact-modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: all 0.15s;
  line-height: 1;
}
.contact-modal-close:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}
.contact-field {
  margin-bottom: 14px;
}
.contact-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
}
.contact-field input,
.contact-field textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.contact-field input:focus,
.contact-field textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}
.contact-field textarea {
  resize: vertical;
  min-height: 100px;
}
.contact-submit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 20px;
  margin-top: 6px;
  border-radius: 10px;
  background: var(--primary);
  border: none;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.contact-submit-btn:hover:not(:disabled) {
  background: var(--primary-hover, #0f9d8e);
  box-shadow: 0 4px 16px rgba(13, 148, 136, 0.35);
  transform: translateY(-1px);
}
.contact-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}
.contact-sending-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: contactSpin 0.6s linear infinite;
}
@keyframes contactSpin {
  to { transform: rotate(360deg); }
}

/* ==================== BRAND DASHBOARD v2 ==================== */

/* ---- Page-level container ---- */
#page-brand-dashboard {
  max-width: 100%;
  margin: 0;
  padding: 0 0 48px;
}

/* ---- Hero Brand ---- */
.bd-hero {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 28px 0 0;
}
.bd-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-sizing: border-box;
}
.bd-hero-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-glow);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.bd-hero-info { flex: 1; }
.bd-hero-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 3px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bd-hero-sub {
  color: var(--text-secondary);
  font-size: .875rem;
  margin: 0;
}

/* ---- KPI Card Row ---- */
.bd-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.bd-kpi-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px;
  border-right: 1px solid var(--border);
  transition: background .18s;
}
.bd-kpi-card:last-child { border-right: none; }
.bd-kpi-card:hover { background: var(--bg-elevated); }
.bd-kpi-card--active { background: rgba(16,185,129,.04); }

.bd-kpi-card-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bd-kpi-icon--blue   { background: rgba(59,130,246,.12);  color: #3B82F6; }
.bd-kpi-icon--purple { background: rgba(139,92,246,.12);  color: #8B5CF6; }
.bd-kpi-icon--teal   { background: var(--primary-bg);     color: var(--primary); }
.bd-kpi-icon--green  { background: rgba(16,185,129,.12);  color: #10b981; }

.bd-kpi-card-value {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}
.bd-kpi-card--active .bd-kpi-card-value { color: #10b981; }
.bd-kpi-card-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

/* ---- Tab nav (sticky) ---- */
.bd-tab-nav-wrap {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.bd-tab-nav {
  display: flex;
  align-items: center;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.bd-tab-nav::-webkit-scrollbar { display: none; }
.bd-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 13px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: color .2s, border-color .2s;
  font-family: var(--font);
  white-space: nowrap;
  flex-shrink: 0;
}
.bd-tab:hover { color: var(--text); }
.bd-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}
.bd-tab-pill {
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  min-width: 18px;
  text-align: center;
}
.bd-tab.active .bd-tab-pill {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ---- Hero compact buttons ---- */
.bd-hero-actions,
.cdash-hero-actions { display: flex; gap: 8px; flex-shrink: 0; align-items: center; }
.bd-btn-export {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-glow);
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, border-color .2s, box-shadow .2s;
  font-family: var(--font);
  white-space: nowrap;
}
.bd-btn-export:hover {
  background: rgba(13,148,136,.18);
  border-color: var(--primary);
  box-shadow: 0 2px 8px var(--primary-glow);
}
.bd-btn-compact {
  width: 34px; height: 34px;
  padding: 0;
  justify-content: center;
  border-radius: 8px;
}

/* ---- Overview panel ---- */
.bd-ov-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.bd-ov-kpi {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  transition: border-color .2s, box-shadow .2s;
}
.bd-ov-kpi:hover { border-color: var(--primary); box-shadow: 0 2px 12px var(--primary-glow); }
.bd-ov-kpi-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bd-ov-kpi-data { flex: 1; min-width: 0; }
.bd-ov-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.bd-ov-kpi-label {
  font-size: .72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-top: 3px;
}
.bd-ov-section { margin-bottom: 22px; }
.bd-ov-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.bd-ov-section-title {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 10px;
}
.bd-ov-section-header .bd-ov-section-title { margin-bottom: 0; }

/* Quick actions */
.bd-ov-quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.bd-ov-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  font-family: var(--font);
}
.bd-ov-action-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px var(--primary-glow);
  transform: translateY(-1px);
}
.bd-ov-action-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.bd-ov-action-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
}

/* Recent lists & campaigns rows */
.bd-ov-recent-list {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}
.bd-ov-campaign-row, .bd-ov-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.bd-ov-campaign-row:last-child, .bd-ov-list-row:last-child { border-bottom: none; }
.bd-ov-campaign-row:hover, .bd-ov-list-row:hover { background: var(--bg-elevated); }
.bd-ov-campaign-name, .bd-ov-list-name {
  flex: 1;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-ov-campaign-date, .bd-ov-list-count {
  font-size: .75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.bd-ov-status {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: .3px;
  flex-shrink: 0;
}
.bd-status--draft     { background: rgba(156,163,175,.15); color: #9ca3af; }
.bd-status--active    { background: rgba(16,185,129,.12);  color: #10b981; }
.bd-status--paused    { background: rgba(245,158,11,.12);  color: #f59e0b; }
.bd-status--completed { background: rgba(99,102,241,.12);  color: #6366f1; }
.bd-ov-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}
.bd-ov-empty a { color: var(--primary); text-decoration: none; }
.bd-ov-empty a:hover { text-decoration: underline; }

/* ---- Campaign sub-tabs ---- */
.bd-sub-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 4px;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.bd-sub-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--text-secondary);
  font-size: .82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  font-family: var(--font);
}
.bd-sub-tab:hover { color: var(--text); background: rgba(255,255,255,.04); }
.bd-sub-tab.active {
  background: var(--bg-card);
  color: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.bd-panel-desc {
  color: var(--text-muted);
  font-size: .85rem;
  margin: 0 0 14px;
  line-height: 1.5;
}

/* ---- Tools grid ---- */
.bd-tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.bd-tool-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s, transform .15s;
  font-family: var(--font);
  text-align: left;
  width: 100%;
}
.bd-tool-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 18px var(--primary-glow);
  transform: translateY(-1px);
}
.bd-tool-card-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bd-tool-card-info { flex: 1; min-width: 0; }
.bd-tool-card-name {
  display: block;
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
}
.bd-tool-card-desc {
  display: block;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.bd-tool-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
  opacity: .5;
  transition: opacity .15s, transform .15s;
}
.bd-tool-card:hover .bd-tool-card-arrow { opacity: 1; transform: translateX(2px); }
.bd-tool-badge {
  font-size: .65rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  flex-shrink: 0;
}

/* Tool detail back + panes */
.bd-tool-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .8rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  margin-bottom: 16px;
  font-family: var(--font);
}
.bd-tool-back:hover { border-color: var(--primary); color: var(--primary); }
.bd-tool-pane-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px;
}
.bd-tool-pane-desc {
  font-size: .84rem;
  color: var(--text-muted);
  margin: 0 0 16px;
  line-height: 1.5;
}

@media (max-width: 640px) {
  .bd-ov-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .bd-ov-quick-actions { grid-template-columns: repeat(2, 1fr); }
  .bd-tool-grid { grid-template-columns: 1fr; }
  .bd-sub-tabs { flex-wrap: wrap; gap: 2px; }
}
@media (max-width: 480px) {
  .bd-ov-kpi-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bd-ov-kpi { padding: 10px; }
  .bd-ov-kpi-value { font-size: 1.1rem; }
  .bd-ov-quick-actions { grid-template-columns: 1fr 1fr; }
  .bd-ov-action-card { padding: 12px 8px; }
}

/* Panels need max-width wrapper now */
.brand-panel {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 24px 20px 0;
  box-sizing: border-box;
  overflow: hidden;
}

/* ---- Master-Detail layout ---- */
.bd-master-detail {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 16px;
  min-height: 480px;
  align-items: start;
}

/* ---- Sidebar ---- */
.bd-sidebar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  position: sticky;
  top: calc(var(--header-h) + 60px);
}
.bd-sidebar-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}
.bd-sidebar-search {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 7px 10px;
  transition: border-color .2s;
}
.bd-sidebar-search:focus-within { border-color: var(--primary); }
.bd-sidebar-search svg { color: var(--text-muted); flex-shrink: 0; }
.bd-sidebar-search input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: .83rem;
}
.bd-sidebar-search input::placeholder { color: var(--text-muted); }
.bd-sidebar-new-btn {
  width: 34px; height: 34px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--primary);
  border: none;
  color: white;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .2s;
}
.bd-sidebar-new-btn:hover { opacity: .85; }
.bd-sidebar-list { overflow-y: auto; max-height: 520px; }
.bd-sidebar-placeholder {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}
/* Sidebar list-item */
.bd-sidebar-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.bd-sidebar-item:hover { background: var(--bg-elevated); }
.bd-sidebar-item.active {
  background: var(--primary-bg);
  border-left-color: var(--primary);
}
.bd-sidebar-item-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.bd-sidebar-item.active .bd-sidebar-item-icon {
  background: var(--primary-bg);
}
.bd-sidebar-item-info { flex: 1; min-width: 0; }
.bd-sidebar-item-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-sidebar-item.active .bd-sidebar-item-name { color: var(--primary); }
.bd-sidebar-item-count {
  font-size: .72rem;
  color: var(--text-muted);
  margin-top: 1px;
}
.bd-sidebar-item-del {
  display: none;
  width: 24px; height: 24px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
}
.bd-sidebar-item:hover .bd-sidebar-item-del { display: flex; }
.bd-sidebar-item-del:hover { background: rgba(239,68,68,.1); color: #ef4444; }

/* Sidebar empty state */
.bd-sidebar-empty-list {
  padding: 40px 20px;
  text-align: center;
}
.bd-sidebar-empty-list p {
  font-size: .82rem;
  color: var(--text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}

/* ---- Detail panel ---- */
.bd-detail-panel {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  min-height: 400px;
}

/* Detail: empty state (nothing selected) */
.bd-detail-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 24px;
  gap: 12px;
  min-height: 400px;
}
.bd-detail-empty-icon {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.bd-detail-empty-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.bd-detail-empty-hint {
  font-size: .85rem;
  color: var(--text-secondary);
  max-width: 300px;
  line-height: 1.5;
  margin: 0;
}

/* Detail: header (when list is open) */
.bd-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.bd-detail-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
}
.bd-detail-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-detail-subtitle {
  font-size: .78rem;
  color: var(--text-muted);
  margin: 2px 0 0;
}

/* Detail: main content */
.bd-detail-body { padding: 20px; }

/* Detail: items grid */
.bd-items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

/* Influencer card inside a list */
.bd-inf-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.bd-inf-card:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 12px var(--primary-glow);
}
.bd-inf-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.bd-inf-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-card);
}
.bd-inf-info { flex: 1; min-width: 0; }
.bd-inf-name {
  font-size: .88rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-inf-handle {
  font-size: .75rem;
  color: var(--text-muted);
}
.bd-inf-card-stats {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.bd-inf-stat {
  flex: 1;
  min-width: 56px;
  background: var(--bg-card);
  border-radius: 8px;
  padding: 6px 8px;
  text-align: center;
}
.bd-inf-stat-val {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
}
.bd-inf-stat-lbl {
  display: block;
  font-size: .62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
}
.bd-inf-note {
  margin-top: 8px;
  font-size: .77rem;
  color: var(--primary);
  font-style: italic;
  line-height: 1.4;
}
.bd-inf-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  gap: 6px;
}
.bd-inf-view-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .75rem;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: var(--font);
  transition: opacity .15s;
}
.bd-inf-view-btn:hover { opacity: .75; }
.bd-inf-remove-btn {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 6px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.bd-inf-remove-btn:hover { border-color: rgba(239,68,68,.4); color: #ef4444; background: rgba(239,68,68,.06); }

/* Detail: empty list body */
.bd-detail-body-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  gap: 10px;
}
.bd-detail-body-empty p { margin: 0; font-size: .88rem; line-height: 1.5; }

/* ---- Campaigns grid ---- */
.bd-campaigns-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.bd-campaigns-bar-left {
  display: flex;
  gap: 10px;
  align-items: center;
  flex: 1;
  flex-wrap: wrap;
}
.bd-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  flex: 1;
  min-width: 160px;
  max-width: 260px;
  transition: border-color .2s;
}
.bd-search-box:focus-within { border-color: var(--primary); }
.bd-search-box svg { color: var(--text-muted); flex-shrink: 0; }
.bd-search-box input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--font); font-size: .85rem;
}
.bd-search-box input::placeholder { color: var(--text-muted); }
.bd-status-filter {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  color: var(--text);
  font-family: var(--font);
  font-size: .83rem;
  cursor: pointer;
}
.bd-campaigns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}
.bd-loading-state {
  grid-column: 1/-1;
  text-align: center;
  padding: 48px;
  color: var(--text-muted);
  font-size: .9rem;
}

/* Campaign card */
.bd-camp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: border-color .2s, box-shadow .2s;
  position: relative;
}
.bd-camp-card:hover { border-color: var(--primary); box-shadow: 0 4px 18px var(--primary-glow); }
.bd-camp-card-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}
.bd-camp-name {
  flex: 1;
  font-size: .98rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
  line-height: 1.3;
}
.bd-camp-status {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .4px;
}
.bd-camp-status.s-draft   { background: rgba(156,163,175,.15); color: #9ca3af; }
.bd-camp-status.s-active  { background: rgba(16,185,129,.12); color: #10b981; }
.bd-camp-status.s-paused  { background: rgba(245,158,11,.12); color: #f59e0b; }
.bd-camp-status.s-completed { background: rgba(99,102,241,.12); color: #6366f1; }

.bd-camp-desc {
  font-size: .82rem;
  color: var(--text-secondary);
  margin: 0 0 12px;
  line-height: 1.5;
  display: -webkit-box; -webkit-box-orient: vertical;
  overflow: hidden;
}
.bd-camp-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 14px;
}
.bd-camp-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: .78rem;
  color: var(--text-muted);
}
.bd-camp-meta-item svg { opacity: .55; flex-shrink: 0; }
.bd-camp-budget { color: var(--primary) !important; font-weight: 700 !important; }

.bd-camp-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.bd-camp-status-sel {
  padding: 6px 10px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  flex: 1;
}
.bd-camp-del-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.bd-camp-del-btn:hover { border-color: rgba(239,68,68,.4); color: #ef4444; background: rgba(239,68,68,.06); }
.bd-camp-edit-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  flex-shrink: 0;
}
.bd-camp-edit-btn:hover { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,.06); }

/* Campaigns empty state */
.bd-camps-empty {
  grid-column: 1/-1;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 64px 24px; gap: 12px;
  color: var(--text-muted);
}
.bd-camps-empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--bg-elevated);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
}
.bd-camps-empty p { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--text-secondary); }

/* ---- Shared buttons ---- */
.bd-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: var(--primary);
  color: white;
  font-size: .83rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .2s, box-shadow .2s;
  white-space: nowrap;
  font-family: var(--font);
}
.bd-btn-primary:hover { opacity: .88; box-shadow: 0 4px 16px var(--primary-glow); }
.bd-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 18px;
  border-radius: 10px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .83rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .2s, color .2s;
  font-family: var(--font);
}
.bd-btn-ghost:hover { border-color: var(--primary); color: var(--text); }
.bd-btn-sm {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--primary-bg);
  border: 1px solid var(--primary-glow);
  color: var(--primary);
  font-size: .75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  font-family: var(--font);
}
.bd-btn-sm:hover { background: var(--primary); color: white; }

/* ---- Modals ---- */
.bd-modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 16px;
}
.bd-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  max-width: 460px;
  width: 100%;
  overflow: hidden;
  animation: bdModalIn .22s ease;
  box-shadow: var(--shadow-lg);
}
.bd-modal-search { max-width: 540px; }
@keyframes bdModalIn {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.bd-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 22px 16px;
  border-bottom: 1px solid var(--border);
}
.bd-modal-header h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}
.bd-modal-close {
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
}
.bd-modal-close:hover { border-color: rgba(239,68,68,.4); color: #ef4444; }
.bd-modal-body { padding: 18px 22px; }
.bd-modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
}
.bd-field-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 5px;
}
.bd-input {
  display: block;
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .88rem;
  margin-bottom: 12px;
  box-sizing: border-box;
  transition: border-color .2s;
  font-family: var(--font);
}
.bd-input:focus { border-color: var(--primary); outline: none; }
.bd-textarea {
  min-height: 80px;
  resize: vertical;
}

/* ---- Add influencer modal search ---- */
.bd-add-search-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.bd-add-search-wrap:focus-within { border-color: var(--primary); }
.bd-add-search-wrap svg { color: var(--text-muted); flex-shrink: 0; }
.bd-add-search-wrap input {
  flex: 1; border: none; background: transparent; outline: none;
  color: var(--text); font-family: var(--font); font-size: .9rem;
}
.bd-add-search-wrap input::placeholder { color: var(--text-muted); }
.bd-add-results {
  min-height: 60px;
  max-height: 280px;
  overflow-y: auto;
  border-radius: 10px;
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.bd-add-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background .15s;
  border-bottom: 1px solid var(--border);
}
.bd-add-result-item:last-child { border-bottom: none; }
.bd-add-result-item:hover { background: var(--bg-elevated); }
.bd-add-result-item.already-added { opacity: .45; cursor: not-allowed; }
.bd-add-result-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}
.bd-add-result-name {
  flex: 1;
  min-width: 0;
}
.bd-add-result-name strong {
  display: block;
  font-size: .85rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bd-add-result-name span {
  font-size: .72rem;
  color: var(--text-muted);
}
.bd-add-result-score {
  font-size: .75rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
}
.bd-add-result-addbtn {
  width: 26px; height: 26px;
  border-radius: 6px;
  border: none;
  background: var(--primary);
  color: white;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .15s;
}
.bd-add-result-addbtn:hover { opacity: .8; }
.bd-add-results-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}
.bd-add-note-row { margin-top: 4px; }

/* ---- Brand: create campaign extra fields ---- */
.bd-field-check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  margin-bottom: 14px;
}
.bd-field-check-row input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}
.bd-check-label {
  font-size: .84rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1.4;
}

/* ---- Brand: Candidature button on campaign card ---- */
.bd-camp-app-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--primary);
  background: transparent;
  color: var(--primary);
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.bd-camp-app-btn:hover { background: var(--primary); color: #fff; }
.bd-camp-app-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
}

/* ---- Brand applicant list (modal) ---- */
.bd-app-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.bd-app-item:last-child { border-bottom: none; }
.bd-app-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border);
  background: var(--bg-elevated);
}
.bd-app-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.bd-app-username {
  font-weight: 700;
  font-size: .9rem;
  color: var(--text);
}
.bd-app-stats {
  display: flex;
  gap: 10px;
  font-size: .78rem;
  color: var(--text-muted);
}
.bd-app-message {
  font-size: .8rem;
  color: var(--text-muted);
  margin: 4px 0 0;
  line-height: 1.45;
  max-height: 56px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-box-orient: vertical;
}
.bd-app-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}
.bd-app-accept-btn, .bd-app-reject-btn {
  padding: 5px 12px;
  border-radius: 7px;
  border: none;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.bd-app-accept-btn { background: #22c55e; color: #fff; }
.bd-app-reject-btn { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.bd-app-accept-btn:hover { opacity: .85; }
.bd-app-reject-btn:hover { border-color: #ef4444; color: #ef4444; }

/* ---- Application status badge ---- */
.app-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
}
.app-status--pending  { background: rgba(234,179,8,.15);  color: #ca8a04; }
.app-status--accepted { background: rgba(34,197,94,.15);  color: #16a34a; }
.app-status--rejected { background: rgba(239,68,68,.12);  color: #dc2626; }

/* ==================== CREATOR DASHBOARD: CAMPAGNE TAB ==================== */
.cdash-camp-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.cdash-camp-col {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}
.cdash-camp-col-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 8px;
}
.cdash-camp-col-header h3 {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}
.cdash-btn-refresh {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-size: .75rem;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  flex-shrink: 0;
}
.cdash-btn-refresh:hover { border-color: var(--primary); color: var(--primary); }
.cdash-camp-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: .84rem;
  background: var(--bg-elevated);
  border-radius: 10px;
  border: 1px dashed var(--border);
}

/* Open campaign card */
.cdash-open-camp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color .15s, box-shadow .15s;
}
.cdash-open-camp-card:hover { border-color: var(--primary); box-shadow: 0 2px 14px var(--primary-glow); }
.cdash-open-camp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.cdash-open-camp-name {
  font-weight: 700;
  font-size: .88rem;
  color: var(--text);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdash-open-camp-budget {
  font-size: .8rem;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  flex-shrink: 0;
}
.cdash-open-camp-desc {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cdash-open-camp-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.cdash-meta-chip {
  font-size: .72rem;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.cdash-apply-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: var(--primary);
  color: #fff;
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}
.cdash-apply-btn:hover { opacity: .85; }

/* My applications rows */
.cdash-application-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.cdash-app-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cdash-app-camp-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cdash-app-brand {
  font-size: .74rem;
  color: var(--text-muted);
}
.cdash-app-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}
.cdash-app-date {
  font-size: .71rem;
  color: var(--text-muted);
}

/* Creator tab badge dot for pending applications */
.cdash-tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #ef4444;
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
}

@media (max-width: 640px) {
  .cdash-camp-layout { grid-template-columns: 1fr; }
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .bd-master-detail { grid-template-columns: 1fr; }
  .bd-sidebar { position: static; }
  .bd-sidebar-list { max-height: none; }
  .bd-items-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
}
@media (max-width: 640px) {
  .bd-hero-inner { padding: 0 16px 16px; gap: 12px; }
  .bd-hero-title { font-size: 1.25rem; }
  .bd-hero-sub { font-size: .78rem; }
  .bd-hero-actions { flex-wrap: wrap; gap: 6px; }
  .bd-btn-export { font-size: .72rem; padding: 6px 10px; gap: 4px; }
  .bd-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .bd-kpi-card { padding: 14px 10px; }
  .bd-kpi-card-value { font-size: 1.3rem; }
  .bd-tab { padding: 10px 12px; font-size: .82rem; }
  .brand-panel { padding: 18px 14px 0; }
  .bd-campaigns-grid { grid-template-columns: 1fr; }
  .bd-modal { border-radius: 14px; }
  .bd-modal-header, .bd-modal-body, .bd-modal-footer { padding-left: 16px; padding-right: 16px; }
  .bd-search-box { max-width: none; flex: 1; }
  .bd-ov-section-header { flex-wrap: wrap; gap: 8px; }
  .bd-sub-tabs { flex-wrap: wrap; gap: 2px; padding: 3px; }
  .bd-sub-tab { padding: 7px 12px; font-size: .78rem; }
}
@media (max-width: 480px) {
  .bd-hero { padding: 18px 0 0; }
  .bd-hero-inner { flex-direction: column; align-items: flex-start; padding: 0 12px 14px; gap: 10px; }
  .bd-hero-icon-wrap { width: 40px; height: 40px; border-radius: 10px; }
  .bd-hero-icon-wrap svg { width: 20px; height: 20px; }
  .bd-hero-title { font-size: 1.1rem; white-space: normal; }
  .bd-hero-sub { font-size: .75rem; }
  .bd-hero-actions { align-self: stretch; }
  .bd-btn-export { flex: 1; justify-content: center; font-size: .72rem; padding: 8px 10px; }
  .bd-kpi-row { grid-template-columns: repeat(2, 1fr); }
  .bd-kpi-card { padding: 10px 8px; }
  .bd-kpi-card-icon { display: none; }
  .bd-kpi-card-value { font-size: 1.1rem; }
  .bd-kpi-card-label { font-size: .62rem; }
  .bd-tab { padding: 9px 8px; font-size: .76rem; gap: 4px; }
  .bd-tab svg { width: 13px; height: 13px; }
  .bd-tab-pill { display: none; }
  .brand-panel { padding: 14px 10px 0; }
  .bd-ov-kpi-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bd-ov-kpi { padding: 10px; gap: 8px; }
  .bd-ov-kpi-icon { width: 34px; height: 34px; border-radius: 8px; }
  .bd-ov-kpi-value { font-size: 1.1rem; }
  .bd-ov-kpi-label { font-size: .65rem; }
  .bd-ov-quick-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
  .bd-ov-action-card { padding: 12px 8px; gap: 6px; }
  .bd-ov-action-icon { width: 32px; height: 32px; border-radius: 8px; }
  .bd-ov-action-label { font-size: .72rem; }
  .bd-ov-campaign-row, .bd-ov-list-row { padding: 10px 12px; gap: 8px; }
  .bd-ov-campaign-name, .bd-ov-list-name { font-size: .78rem; }
  .bd-ov-campaign-date, .bd-ov-list-count { font-size: .68rem; }
  .bd-ov-status { font-size: .6rem; padding: 2px 6px; }
  .bd-detail-header { flex-direction: column; align-items: stretch; }
  .bd-items-grid { grid-template-columns: 1fr; }
  .bd-modal-footer { flex-direction: column-reverse; }
  .bd-modal-footer button { width: 100%; justify-content: center; }
  .bd-sub-tab { padding: 6px 10px; font-size: .75rem; }
  .bd-tool-card { padding: 12px 14px; gap: 10px; }
  .bd-tool-card-icon { width: 36px; height: 36px; border-radius: 10px; }
  .bd-tool-card-name { font-size: .82rem; }
  .bd-tool-card-desc { font-size: .7rem; }
}
@media (max-width: 360px) {
  .bd-hero { padding: 12px 0 0; }
  .bd-hero-inner { padding: 0 8px 10px; gap: 8px; }
  .bd-hero-icon-wrap { width: 36px; height: 36px; border-radius: 8px; }
  .bd-hero-title { font-size: 1rem; }
  .bd-hero-sub { font-size: .7rem; }
  .bd-btn-export { font-size: .68rem; padding: 6px 8px; }
  .bd-kpi-row { grid-template-columns: 1fr 1fr; }
  .bd-kpi-card { padding: 8px 6px; }
  .bd-kpi-card-value { font-size: 1rem; }
  .bd-kpi-card-label { font-size: .58rem; }
  .bd-tab { padding: 7px 6px; font-size: .72rem; }
  .bd-tab svg { display: none; }
  .brand-panel { padding: 10px 8px 0; }
  .bd-ov-kpi-row { grid-template-columns: 1fr; gap: 6px; }
  .bd-ov-kpi { padding: 8px; }
  .bd-ov-kpi-value { font-size: 1rem; }
  .bd-ov-quick-actions { grid-template-columns: 1fr 1fr; gap: 6px; }
  .bd-ov-action-card { padding: 10px 6px; }
  .bd-ov-action-icon { width: 28px; height: 28px; }
  .bd-ov-action-label { font-size: .68rem; }
  .bd-ov-campaign-row, .bd-ov-list-row { padding: 8px 10px; gap: 6px; }
  .bd-ov-campaign-name, .bd-ov-list-name { font-size: .72rem; }
  .bd-sub-tab { padding: 5px 8px; font-size: .7rem; }
  .bd-tool-card { padding: 10px 12px; gap: 8px; }
  .bd-tool-card-icon { width: 32px; height: 32px; }
  .bd-tool-card-name { font-size: .78rem; }
}

/* ====================================================================
   ADDITIONAL MOBILE FIXES — 640px, 480px, 360px
   ==================================================================== */

/* --- 640px: Events / Community / Chat / Creator Dashboard / Shop --- */
@media (max-width: 640px) {
  /* Events v2 */
  .ev-page { padding: 0 14px 30px; }
  .ev-hero { padding: 24px 0 16px; }
  .ev-hero h1 { font-size: 22px; }
  .ev-hero-icon { width: 44px; height: 44px; border-radius: 12px; }
  .ev-hero-icon svg { width: 22px; height: 22px; }
  .ev-tabs { gap: 4px; padding-bottom: 18px; }
  .ev-tab { padding: 7px 14px; font-size: 12px; }
  .ev-grid { gap: 12px; }
  .ev-card-body { padding: 14px 16px 16px; }
  .ev-card-title { font-size: 15px; }
  .ev-card-meta-row { font-size: 12px; }
  .ev-detail { padding: 14px 12px; }
  .ev-detail-header h1 { font-size: 20px; }
  .ev-detail-img { height: 190px; border-radius: var(--radius-sm); }
  .ev-detail-cta { padding: 18px; }
  .ev-booking-card { padding: 16px 18px; }
  .ev-booking-title { font-size: 15px; }

  /* Community */
  .community-hero { padding: 20px 0 14px; }
  .community-panel { padding: 0 12px; }
  .community-tabs { padding: 0 12px; }
  .creator-card { padding: 12px 14px; gap: 10px; }
  .creator-avatar { width: 36px; height: 36px; font-size: 14px; }
  .creator-info strong { font-size: 13px; }

  /* Chat */
  .chat-layout { border-radius: 10px; }
  .chat-sidebar { max-height: 240px; }
  .chat-sidebar-header { padding: 14px 14px 10px; }
  .chat-sidebar-header h3 { font-size: 14px; margin: 0 0 10px; }
  .chat-conv-item { padding: 10px 12px; gap: 10px; margin: 0 4px; border-radius: 10px; }
  .chat-conv-avatar { width: 38px; height: 38px; font-size: 14px; }
  .chat-conv-info strong { font-size: 13px; }
  .chat-conv-preview { font-size: 11.5px; }
  .chat-messages { padding: 16px; min-height: 320px; }
  .chat-msg-bubble { font-size: 13.5px; padding: 9px 14px 7px; }
  .chat-input-area { padding: 10px 12px; gap: 8px; }
  .chat-input-area .input { padding: 10px 16px; font-size: 14px; }
  .chat-input-area .btn-primary { width: 42px; height: 42px; min-width: 42px; }
  .chat-header { padding: 12px 14px; gap: 10px; }
  .chat-header-avatar { width: 36px; height: 36px; font-size: 13px; }
  .chat-header-info .chat-header-name { font-size: 14px; }

  /* Creator Dashboard */
  .cdash-hero-v2 { padding: 20px 0 16px; }
  .cdash-hero-inner { padding: 0 14px; gap: 14px; }
  .cdash-hero-name { font-size: 18px; }
  .cdash-hero-handle { font-size: 13px; margin-bottom: 8px; }
  .cdash-hero-stat { font-size: 12px; padding: 3px 10px; }
  .cdash-tab { padding: 11px 12px; font-size: 12.5px; }
  .cdash-panel { padding: 18px 14px 36px; }
  .cdash-ranking-card { padding: 18px; }
  .cdash-ranking-info h2 { font-size: 18px; }
  .cdash-stat-box { padding: 14px; }
  .cdash-stat-box .stat-value { font-size: 20px; }
  .cdash-event-body { padding: 14px; }
  .cdash-event-body h3 { font-size: 15px; }
  .cdash-friend-card { padding: 14px; gap: 10px; }
  .cdash-friend-avatar { width: 38px; height: 38px; font-size: 16px; }
  .cdash-section-title { font-size: 15px; }
  .cdash-badges-grid { gap: 8px; margin-bottom: 30px !important;}
  .cdash-badge-item { padding: 6px 12px 6px 8px; }
  .cdash-badge-icon { font-size: 18px; }
  .cdash-badge-name { font-size: 11px; }
  .cdash-inpanel-section { padding: 14px; }
  .cdash-inpanel-section-title { font-size: 14px; }
  .cdash-hero-actions .bd-btn-export { font-size: 11px; padding: 6px 10px; gap: 4px; }

  /* Shop */
  .shop-grid { grid-template-columns: 1fr; }
  .shop-item { padding: 14px; }
  .shop-item-icon { width: 38px; height: 38px; font-size: 24px; border-radius: 8px; }
  .shop-item-name { font-size: 12px; }

  /* Alerts */
  .alerts-form-card { padding: 16px; }
  .alerts-form-card h3 { font-size: 1rem; }
  .alert-item { padding: 12px 14px; }
  .alert-item-name { font-size: 0.85rem; }
}

/* --- 480px: Events / Community / Chat / Creator Dashboard / Shop --- */
@media (max-width: 480px) {
  /* Events v2 */
  .ev-page { padding: 0 10px 24px; }
  .ev-hero { padding: 18px 0 12px; }
  .ev-hero h1 { font-size: 20px; }
  .ev-hero-sub { font-size: 12px; }
  .ev-hero-icon { width: 40px; height: 40px; border-radius: 10px; }
  .ev-hero-icon svg { width: 20px; height: 20px; }
  .ev-tabs { padding-bottom: 14px; }
  .ev-tab { padding: 6px 12px; font-size: 12px; gap: 4px; }
  .ev-tab svg { width: 12px; height: 12px; }
  .ev-grid { gap: 10px; }
  .ev-card-img { height: 140px; }
  .ev-card-body { padding: 12px 14px 14px; }
  .ev-card-title { font-size: 14px; }
  .ev-card-footer { padding-top: 10px; }
  .ev-card-spots { font-size: 11px; }
  .ev-card-arrow { width: 26px; height: 26px; }
  .ev-card-status { font-size: 10px; padding: 3px 8px; }
  .ev-booking-card { padding: 14px 16px; }
  .ev-detail { padding: 12px 10px; }
  .ev-detail-header h1 { font-size: 18px; margin: 0 0 14px; }
  .ev-detail-img { height: 170px; }
  .ev-detail-pill { font-size: 11px; padding: 5px 10px; }
  .ev-detail-desc { font-size: 13px; line-height: 1.6; }
  .ev-detail-cta { padding: 16px; }
  .ev-detail-cta h3 { font-size: 16px; }
  .ev-detail-cta-btn { font-size: 14px; padding: 10px 24px; }

  /* Community */
  .community-hero { padding: 14px 0 10px; }
  .community-hero h1 { font-size: 18px; }
  .community-subtitle { font-size: 12px; }
  .community-tabs { gap: 2px; }
  .community-tab { font-size: 12px; padding: 8px 10px; }
  .community-panel { padding: 0 10px; }
  .creator-card { padding: 10px 12px; }
  .friend-request-card { padding: 10px 12px; gap: 10px; font-size: 13px; }

  /* Chat */
  .chat-layout { border-radius: 8px; }
  .chat-sidebar { max-height: 220px; }
  .chat-messages { min-height: 280px; padding: 12px; }
  .chat-msg-bubble { max-width: 88%; font-size: 13px; padding: 8px 12px 6px; border-radius: 16px; }
  .chat-empty-state { padding: 24px 14px; }
  .chat-empty-state svg { width: 44px; height: 44px; }
  .chat-empty-state h3 { font-size: 14px; }
  .chat-empty-state p { font-size: 12px; }
  .chat-date-sep span { font-size: 10px; }
  .chat-input-area .input { padding: 10px 14px; font-size: 13px; }
  .chat-input-area .btn-primary { width: 40px; height: 40px; min-width: 40px; }
  .chat-conv-avatar { width: 36px; height: 36px; font-size: 13px; }

  /* Creator Dashboard */
  .cdash-hero-v2 { padding: 14px 0 12px; }
  .cdash-hero-inner { flex-direction: column; align-items: flex-start; padding: 0 12px; gap: 10px; }
  .cdash-hero-avatar { width: 52px; height: 52px; border-width: 2px; box-shadow: 0 0 0 3px var(--primary-glow); }
  .cdash-hero-name { font-size: 17px; white-space: normal; }
  .cdash-hero-handle { font-size: 12px; margin-bottom: 6px; }
  .cdash-hero-stat { font-size: 11px; padding: 3px 8px; }
  .cdash-hero-stat-row { gap: 4px; }
  .cdash-hero-actions { align-self: stretch; }
  .cdash-hero-actions .bd-btn-export { width: 100%; justify-content: center; font-size: 12px; padding: 8px 12px; }
  .cdash-tab { font-size: 11px; padding: 9px 8px; gap: 4px; }
  .cdash-tab svg { width: 13px; height: 13px; }
  .cdash-panel { padding: 14px 10px 32px; }
  .cdash-ranking-card { padding: 14px; }
  .cdash-ranking-avatar { width: 50px; height: 50px; border-width: 2px; }
  .cdash-ranking-info h2 { font-size: 16px; }
  .cdash-ranking-info .cdash-rank { font-size: 12px; }
  .cdash-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .cdash-stat-box { padding: 10px 8px; }
  .cdash-stat-box .stat-value { font-size: 17px; }
  .cdash-stat-box .stat-label { font-size: 10px; }
  .cdash-event-img { height: 120px; }
  .cdash-event-body { padding: 12px; }
  .cdash-event-body h3 { font-size: 14px; }
  .cdash-event-meta span { font-size: 12px; }
  .cdash-event-card { border-radius: 16px; }
  .cdash-friend-card { padding: 10px; gap: 8px; flex-wrap: wrap; }
  .cdash-friend-info .name { font-size: 13px; }
  .cdash-friend-actions { width: 100%; justify-content: flex-end; }
  .cdash-friend-actions button { padding: 5px 10px; font-size: 11px; }
  .cdash-pending-card { padding: 10px 12px; }
  .cdash-section-title { font-size: 14px; }
  .cdash-badges-row { padding: 0 10px; }
  .cdash-badge-item { padding: 5px 10px 5px 7px; }
  .cdash-badge-name { font-size: 10px; }
  .cdash-badge-icon { font-size: 16px; }
  .cdash-inpanel-section { padding: 12px 10px; }
  .cdash-inpanel-section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cdash-inpanel-section-title { font-size: 13px; }
  .cdash-panel-toolbar { flex-direction: column; align-items: flex-start; gap: 8px; }
  .cdash-panel-title { font-size: 16px; }
  .cd-sub-tabs { gap: 2px; padding: 3px; }
  .cd-sub-tab { padding: 7px 10px; font-size: .76rem; }
  .cdash-platforms-list { gap: 6px; }
  .cdash-platform-badge { padding: 5px 10px; font-size: 12px; }

  /* Shop */
  .shop-item-top { gap: 10px; }
  .shop-item-icon { width: 34px; height: 34px; font-size: 20px; }
  .shop-section-title { font-size: 13px; }
  .shop-buy-btn, .shop-equip-btn, .shop-unequip-btn { padding: 5px 12px; font-size: 11px; }

  /* Alerts */
  .alerts-form-card { padding: 14px; }
  .alert-item-name { font-size: 0.82rem; }
  .alert-item-type { font-size: 0.72rem; }
  .btn-alert-delete { padding: 4px; }

  /* Contact modal */
  .contact-modal { padding: 18px 14px; width: 96%; border-radius: 12px; }
  .contact-modal-header h3 { font-size: 1rem; }
  .contact-field input, .contact-field textarea { padding: 9px 10px; font-size: 0.85rem; }
  .contact-submit-btn { padding: 10px 16px; font-size: 0.85rem; }

  /* Admin table horizontal scroll */
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 6px 8px; white-space: nowrap; }

  /* Edit profile mobile */
  .edit-profile { padding: 0 10px; }
}

/* --- 360px: Events / Community / Chat / Creator Dashboard --- */
@media (max-width: 360px) {
  /* Events v2 */
  .ev-page { padding: 0 8px 20px; }
  .ev-hero h1 { font-size: 18px; }
  .ev-hero-icon { width: 36px; height: 36px; border-radius: 9px; }
  .ev-hero-icon svg { width: 18px; height: 18px; }
  .ev-tab { padding: 5px 10px; font-size: 11px; }
  .ev-card-img { height: 120px; }
  .ev-card-title { font-size: 13px; }
  .ev-detail-header h1 { font-size: 16px; }
  .ev-detail-img { height: 150px; }

  /* Community */
  .community-hero h1 { font-size: 16px; }
  .community-tab { font-size: 11px; padding: 7px 8px; }
  .creator-card { gap: 8px; }
  .creator-avatar { width: 32px; height: 32px; font-size: 12px; }

  /* Chat */
  .chat-sidebar { max-height: 160px; }
  .chat-conv-avatar { width: 30px; height: 30px; font-size: 11px; }
  .chat-msg-bubble { max-width: 92%; }
  .chat-input-area .input { padding: 7px 10px; font-size: 12px; }
  .chat-input-area .btn-primary { width: 34px; height: 34px; min-width: 34px; }

  /* Creator Dashboard */
  .cdash-hero-v2 { padding: 10px 0 8px; }
  .cdash-hero-inner { padding: 0 8px; gap: 8px; }
  .cdash-hero-avatar { width: 44px; height: 44px; }
  .cdash-hero-name { font-size: 15px; }
  .cdash-hero-handle { font-size: 11px; }
  .cdash-hero-stat { font-size: 10px; padding: 2px 6px; }
  .cdash-hero-stat-row { gap: 3px; }
  .cdash-tab { font-size: 10px; padding: 7px 6px; }
  .cdash-tab svg { display: none; }
  .cdash-panel { padding: 10px 8px 28px; }
  .cdash-ranking-card { padding: 12px; }
  .cdash-ranking-avatar { width: 44px; height: 44px; }
  .cdash-ranking-info h2 { font-size: 14px; }
  .cdash-stats-grid { grid-template-columns: 1fr; gap: 6px; }
  .cdash-stat-box { padding: 8px; }
  .cdash-stat-box .stat-value { font-size: 16px; }
  .cdash-stat-box .stat-label { font-size: 10px; }
  .cdash-event-body { padding: 10px; }
  .cdash-event-body h3 { font-size: 13px; }
  .cdash-event-img { height: 100px; }
  .cdash-friend-card { padding: 8px; gap: 6px; }
  .cdash-friend-avatar { width: 32px; height: 32px; font-size: 14px; }
  .cdash-friend-info .name { font-size: 12px; }
  .cdash-friend-actions button { padding: 4px 8px; font-size: 10px; }
  .cdash-badges-grid { gap: 4px; margin-bottom: 24px !important; }
  .cdash-badge-item { padding: 4px 8px 4px 6px; }
  .cdash-badge-icon { font-size: 14px; }
  .cdash-badge-name { font-size: 9px; }
  .cdash-section-title { font-size: 13px; }
  .cdash-inpanel-section { padding: 10px 8px; }
  .cdash-inpanel-section-title { font-size: 12px; }
  .cd-sub-tab { padding: 6px 8px; font-size: .72rem; }

  /* Shop */
  .shop-item { padding: 12px; }
  .shop-item-name { font-size: 12px; }
  .shop-item-desc { font-size: 10px; }

  /* Contact modal */
  .contact-modal { padding: 14px 12px; }
}

/* --- Global overflow prevention --- */
html, body { overflow-x: hidden; }
.main { overflow-x: hidden; }
.page { overflow-x: hidden; }

/* Creator Dashboard: prevent any child from causing horizontal overflow */
#page-creator-dashboard { max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
#page-creator-dashboard .cdash-panel,
#page-creator-dashboard .cdash-hero-v2,
#page-creator-dashboard .cdash-badges-row,
#page-creator-dashboard .cdash-inpanel-section,
#page-creator-dashboard .cdash-ranking-card { box-sizing: border-box; max-width: 100%; }
#page-creator-dashboard img { max-width: 100%; height: auto; }
#page-creator-dashboard .cdash-hero-avatar img,
#page-creator-dashboard .cdash-ranking-avatar img,
#page-creator-dashboard .cdash-friend-avatar img { max-width: none; }

/* Brand Dashboard: prevent horizontal overflow */
#page-brand-dashboard { max-width: 100vw; overflow-x: hidden; box-sizing: border-box; }
#page-brand-dashboard .brand-panel,
#page-brand-dashboard .bd-hero,
#page-brand-dashboard .bd-ov-recent-list { box-sizing: border-box; max-width: 100%; }
#page-brand-dashboard img { max-width: 100%; height: auto; }

/* ====================================================================
   SUPPLEMENTAL MOBILE FIXES — padding, spacing, brand dashboard
   ==================================================================== */

/* --- 640px: Brand Dashboard, page headers, ranking container --- */
@media (max-width: 640px) {
  /* (Brand Dashboard responsive already in its own section) */

  /* Page header — general pages */
  .page-header { padding: 14px 12px 0; gap: 10px; }
  .page-header h1 { font-size: 18px; }

  /* Ranking container padding */
  .ranking-container { padding: 0 8px 28px; }

  /* Admin section title */
  .admin-section h3 { font-size: 14px; }

  /* Mobile nav: allow scrolling if content overflows */
  .mobile-nav { overflow-y: auto; }
}

/* --- 480px: Brand Dashboard additional --- */
@media (max-width: 480px) {
  /* (Brand Dashboard responsive already in its own section) */

  /* Admin card meta shrink */
  .admin-card-meta span { font-size: 10px; }

  /* Page header */
  .page-header h1 { font-size: 17px; }

  /* Shop grid force single column */
  .shop-grid { grid-template-columns: 1fr !important; }
  .shop-color-preview { max-width: 100%; flex-wrap: wrap; }
  .shop-frame-preview { max-width: 100%; }
}

/* --- 360px: Brand Dashboard, Admin, misc --- */
@media (max-width: 360px) {
  /* (Brand Dashboard responsive already in its own section) */

  /* Admin section */
  .admin-card-meta { flex-wrap: wrap; gap: 4px; }
  .admin-platform-stats { flex-wrap: wrap; }

  /* Notification dropdown */
  .notif-item { padding: 7px 10px; gap: 6px; }
  .notif-item-title { font-size: 11px; }
  .notif-item-time { font-size: 10px; }

  /* Page header */
  .page-header h1 { font-size: 16px; }
  .page-header { padding: 12px 8px 0; }

  /* Ranking container */
  .ranking-container { padding: 0 6px 24px; }

  /* Mobile nav — compact spacing */
  .mobile-nav-btn { padding: 11px 16px; font-size: 13px; }
  .mobile-nav-btn svg { width: 16px; height: 16px; }
  .mobile-nav-user { gap: 10px; padding: 14px 16px; }
  .mobile-nav-avatar { width: 42px; height: 42px; }
  .mobile-nav-user-name { font-size: 13px; }
}

/* Reduce animations for users who prefer it + CPU savings */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* =============================================
   NEW FEATURES — Deliverables, Matches, API, Portfolio, Analytics
   ============================================= */

/* ---- Brand: Deliverables ---- */
.bd-deliverables-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.bd-deliverable-card {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 18px;
  transition: border-color .2s;
}
.bd-deliverable-card:hover { border-color: var(--primary); }
.bd-deliverable-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.bd-deliverable-type { font-weight: 600; font-size: 15px; }
.bd-deliverable-status {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 500;
}
.bd-deliv-status--pending { background: rgba(245,158,11,.15); color: #f59e0b; }
.bd-deliv-status--submitted { background: rgba(59,130,246,.15); color: #3b82f6; }
.bd-deliv-status--approved { background: rgba(16,185,129,.15); color: #10b981; }
.bd-deliv-status--revision { background: rgba(239,68,68,.15); color: #ef4444; }
.bd-deliverable-desc { font-size: 13px; color: var(--text-secondary); margin: 6px 0; }
.bd-deliverable-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
}
.bd-deliverable-link {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  margin: 6px 0;
}
.bd-deliverable-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.bd-btn-sm {
  padding: 5px 12px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  border: 1px solid var(--border, rgba(255,255,255,0.1));
  background: transparent;
  color: var(--text-primary);
  transition: .2s;
}
.bd-btn-sm:hover { background: rgba(255,255,255,0.06); }
.bd-btn-success { color: #10b981; border-color: #10b981; }
.bd-btn-success:hover { background: rgba(16,185,129,.12); }
.bd-btn-warning { color: #f59e0b; border-color: #f59e0b; }
.bd-btn-warning:hover { background: rgba(245,158,11,.12); }
.bd-btn-danger { color: #ef4444; border-color: #ef4444; }
.bd-btn-danger:hover { background: rgba(239,68,68,.12); }

/* ---- Brand: Matches ---- */
.bd-matches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.bd-match-card {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color .2s, transform .15s;
}
.bd-match-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.bd-match-score-ring {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: conic-gradient(var(--score-color, var(--primary)) var(--score-pct, 0%), rgba(255,255,255,0.08) 0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.bd-match-score-ring span {
  background: var(--bg-primary, #0a0a0a);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: var(--score-color, var(--primary));
}
.bd-match-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.bd-match-info { min-width: 0; }
.bd-match-name { font-weight: 600; font-size: 14px; display: block; }
.bd-match-handle { font-size: 12px; color: var(--text-muted); }
.bd-match-stats {
  display: flex;
  gap: 10px;
  font-size: 12px;
  margin-top: 4px;
  color: var(--text-secondary);
}

/* ---- Marketplace Service Cards ---- */
.marketplace-service-card {
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border-light);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.mkt-service-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  color: var(--fluenk-accent);
  background: rgba(6,182,212,.08);
  padding: 2px 10px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.mkt-service-title {
  font-weight: 700;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.mkt-service-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.mkt-service-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 14px;
  margin-bottom: 8px;
}
.mkt-service-price {
  font-weight: 700;
  color: var(--neon-lime);
}
.mkt-service-delivery {
  color: var(--text-muted);
  font-size: 13px;
}
.mkt-service-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* ---- Creator Match Cards ---- */
.creator-match-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  transition: transform .15s;
}
.creator-match-card:hover { transform: translateY(-1px); }
.match-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-light);
}
.match-info {
  flex: 1;
  min-width: 0;
}
.match-username {
  font-weight: 600;
  font-size: 14px;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.match-score-bar {
  width: 100%;
  height: 6px;
  background: var(--bg-elevated);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 4px;
}
.match-score-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--fluenk-accent), var(--neon-lime));
  border-radius: 3px;
  transition: width .4s ease;
}
.match-score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--neon-lime);
  margin-bottom: 2px;
}
.match-reason {
  font-size: 12px;
  color: var(--text-secondary);
}

/* ---- Brand: API & Webhook ---- */
.bd-api-section { padding: 0; }
.bd-api-section h3 { font-size: 17px; margin-bottom: 6px; }
.bd-api-desc { font-size: 13px; color: var(--text-muted); margin-bottom: 14px; }
.bd-api-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.bd-api-list { display: flex; flex-direction: column; gap: 10px; }
.bd-api-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 10px;
}
.bd-api-item-info { flex: 1; min-width: 0; }
.bd-api-item-info strong { display: block; font-size: 14px; word-break: break-all; }
.bd-api-key-value {
  display: block;
  font-size: 12px;
  color: var(--primary);
  word-break: break-all;
  margin: 3px 0;
  background: rgba(13,148,136,.08);
  padding: 4px 8px;
  border-radius: 6px;
}
.bd-api-item-meta { font-size: 11px; color: var(--text-muted); }
.bd-api-empty { font-size: 13px; color: var(--text-muted); padding: 8px 0; }
.bd-api-docs {
  background: var(--card-bg, rgba(255,255,255,0.03));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 16px;
}
.bd-api-endpoint {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 0;
  font-size: 13px;
  flex-wrap: wrap;
}
.bd-api-endpoint code {
  background: rgba(13,148,136,.1);
  color: var(--primary);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
}
.bd-api-endpoint span { color: var(--text-secondary); }

/* API Key created modal display */
.bd-apikey-display {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(13,148,136,.08);
  border: 1px solid var(--primary);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 8px;
}
.bd-apikey-display code {
  flex: 1;
  font-size: 13px;
  word-break: break-all;
  color: var(--primary);
  background: none;
  padding: 0;
  user-select: all;
}

/* ---- Creator: Portfolio ---- */
.cdash-portfolio-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}
.cdash-portfolio-header h3 { margin: 0; font-size: 17px; }
.cdash-portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.cdash-portfolio-card {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .2s, transform .15s;
}
.cdash-portfolio-card:hover { border-color: var(--primary); transform: translateY(-2px); }
.cdash-portfolio-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.03);
  font-size: 40px;
}
.cdash-portfolio-social-thumb {
  background: linear-gradient(135deg, rgba(131,58,180,0.15), rgba(253,29,29,0.15), rgba(252,176,69,0.12));
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.2s;
  border-radius: 8px 8px 0 0;
}
.cdash-portfolio-social-thumb:hover { background: linear-gradient(135deg, rgba(131,58,180,0.25), rgba(253,29,29,0.25), rgba(252,176,69,0.2)); }
.cdash-portfolio-social-icon { font-size: 48px; line-height: 1; }
.cdash-portfolio-social-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); letter-spacing: 0.5px; }
.cdash-portfolio-body { padding: 14px 16px; }
.cdash-portfolio-body h4 { margin: 0 0 6px; font-size: 15px; }
.cdash-portfolio-body p { font-size: 13px; color: var(--text-secondary); margin: 0 0 8px; }
.cdash-portfolio-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}
.cdash-portfolio-link {
  display: inline-block;
  font-size: 13px;
  color: var(--primary);
  margin-top: 4px;
}
.cdash-portfolio-actions {
  display: flex;
  gap: 6px;
  padding: 0 16px 14px;
}

/* ---- Creator: Deliverables ---- */
.cdash-deliverables-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.cdash-deliverable-item {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 14px;
  padding: 16px;
}
.cdash-deliverable-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}
.cdash-deliverable-type { font-weight: 600; font-size: 15px; }
.cdash-deliverable-desc { font-size: 13px; color: var(--text-secondary); margin: 4px 0; }
.cdash-deliverable-meta {
  display: flex;
  gap: 16px;
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
}
.cdash-deliverable-submit {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  align-items: center;
}
.cdash-deliverable-submit .bd-input { flex: 1; }

/* ---- Profile: Analytics ---- */
.profile-analytics-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.analytics-metric {
  background: var(--card-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--border, rgba(255,255,255,0.08));
  border-radius: 12px;
  padding: 14px 20px;
  text-align: center;
  min-width: 120px;
}
.analytics-metric-value {
  display: block;
  font-size: 22px;
  font-weight: 700;
}
.analytics-metric-label {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---- Responsive adjustments ---- */
@media (max-width: 768px) {
  .bd-deliverables-grid,
  .bd-matches-grid,
  .cdash-portfolio-grid { grid-template-columns: 1fr; }
  .bd-api-actions { flex-direction: column; }
  .bd-api-actions .bd-input { max-width: 100% !important; }
  .profile-analytics-summary { flex-direction: column; }
  .analytics-metric { min-width: auto; }
}

/* ========== CALCOLATORE PUBBLICO ========== */

.calc-page { max-width: 800px; margin: 0 auto; padding-bottom: 3rem; }

/* Hero */
.calc-hero { text-align: center; margin-bottom: 2rem; }
.calc-hero-badge {
  display: inline-block;
  background: rgba(13, 148, 136, .12);
  color: var(--primary);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
  border: 1px solid rgba(13, 148, 136, .2);
}
.calc-hero h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 300;
  letter-spacing: -.03em;
}
.calc-hero h1 span { color: var(--primary); font-weight: 700; }
.calc-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: .75rem;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* 3 Step "Come funziona" */
.calc-steps {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 2rem;
  padding: 0 .5rem;
}
.calc-step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
}
.calc-step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calc-step-body h3 { font-size: 13px; font-weight: 600; margin-bottom: 3px; color: var(--text-primary); }
.calc-step-body p { font-size: 11px; color: var(--text-muted); line-height: 1.5; }
.calc-step-arrow {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-top: 1.8rem;
}

/* Chips metriche */
.calc-metrics-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-bottom: 2rem;
}
.calc-metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px;
}

/* Piattaforme supportate */
.calc-supported {
  margin-bottom: 2rem;
}
.calc-supported h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .75rem;
  text-align: center;
}
.calc-supported-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}
.calc-sp-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s;
}
.calc-sp-item:hover {
  border-color: var(--sp-color, var(--primary));
  box-shadow: 0 0 0 2px rgba(13,148,136,.1);
}
.calc-sp-icon {
  display: flex;
  align-items: center;
  color: var(--sp-color, var(--text-secondary));
}

/* Form card */
.calc-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}
.calc-form-header {
  margin-bottom: 1.2rem;
}
.calc-form-header h2 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: .3rem;
}
.calc-form-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

/* Platform input rows */
.calc-platform-inputs {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 1.2rem;
}
.calc-pl-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}
.calc-pl-input-icon {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--sp-color-rgb, 128,128,128), .08);
  color: var(--sp-color, var(--text-muted));
  border: 1px solid rgba(var(--sp-color-rgb, 128,128,128), .15);
}
.calc-pl-input-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.calc-pl-input-body label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: .03em;
}
.calc-link-input {
  flex: 1;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .55rem .8rem;
  font-size: 13px;
  color: var(--text-primary);
  transition: border-color .2s, box-shadow .2s;
}
.calc-link-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(13, 148, 136, .15);
}
.calc-link-input::placeholder { color: var(--text-muted); opacity: .6; }

/* Form footer */
.calc-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.calc-form-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
}
.calc-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: .65rem 1.6rem;
  font-weight: 600;
}
.calc-submit-btn:disabled {
  opacity: .5;
  cursor: not-allowed;
}

/* Loading */
.calc-loading {
  display: flex;
  justify-content: center;
  padding: 2rem 0;
}
.calc-loading-inner {
  text-align: center;
  max-width: 340px;
}
.calc-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: calcSpin 1s linear infinite;
  margin: 0 auto 1rem;
}
@keyframes calcSpin { to { transform: rotate(360deg); } }
.calc-loading-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .3rem;
}
.calc-loading-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
  line-height: 1.5;
}
.calc-loading-steps {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.calc-load-step {
  font-size: 12px;
  color: var(--text-muted);
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all .3s;
}
.calc-load-step.active {
  color: var(--primary);
  border-color: var(--primary);
  background: rgba(13,148,136,.06);
  font-weight: 600;
}
.calc-load-step.done {
  color: #10b981;
  border-color: rgba(16,185,129,.3);
  background: rgba(16,185,129,.06);
}
.calc-load-step.done::before {
  content: '✓ ';
  font-weight: 700;
}

/* Add Influencer Progress Modal */
.add-influencer-progress-inner {
  text-align: center;
  padding: 1rem 0;
}
.add-influencer-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border);
  border-top-color: var(--neon-lime);
  border-radius: 50%;
  animation: addInfSpin 1s linear infinite;
  margin: 0 auto 1.2rem;
}
@keyframes addInfSpin { to { transform: rotate(360deg); } }
.add-influencer-progress-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
}
.add-influencer-progress-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 1.4rem;
  line-height: 1.5;
}
.add-influencer-progress-steps {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.add-inf-step {
  font-size: 13px;
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  transition: all 0.3s;
  display: flex;
  align-items: center;
  gap: 10px;
}
.add-inf-step::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all 0.3s;
}
.add-inf-step.active {
  color: var(--neon-lime);
  border-color: var(--neon-lime);
  background: rgba(13,148,136,0.08);
  font-weight: 600;
}
.add-inf-step.active::before {
  border-color: var(--neon-lime);
  background: var(--neon-lime);
  box-shadow: 0 0 8px rgba(13,148,136,0.5);
  animation: addInfPulse 1.5s ease-in-out infinite;
}
@keyframes addInfPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.2); opacity: 0.7; }
}
.add-inf-step.done {
  color: #10b981;
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.06);
}
.add-inf-step.done::before {
  content: '✓';
  border-color: #10b981;
  background: #10b981;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.add-inf-step.error {
  color: #ef4444;
  border-color: rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.06);
}
.add-inf-step.error::before {
  content: '✕';
  border-color: #ef4444;
  background: #ef4444;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.add-inf-step.skipped {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--bg-secondary);
  opacity: 0.5;
}
.add-inf-step.skipped::before {
  content: '–';
  border-color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

/* Risultato */
.calc-result { margin-top: 1.5rem; }
.calc-result-header {
  text-align: center;
  margin-bottom: 1rem;
}
.calc-result-header h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--text-muted);
}

/* Score ring */
.calc-score-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.5rem;
}
.calc-score-ring {
  position: relative;
  width: 140px;
  height: 140px;
}
.calc-ring-svg { width: 100%; height: 100%; }
.calc-ring-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--text-primary);
}
.calc-score-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
}
.calc-band-badge {
  display: inline-block;
  padding: .25rem .8rem;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.calc-score-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .1em;
}

/* Score bar */
.calc-scorebar-wrap { margin-bottom: 2rem; }
.calc-scorebar-bg {
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: .5rem;
}
.calc-scorebar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.5s ease;
}
.calc-bands-row {
  display: flex;
  gap: 2px;
}
.calc-band-seg {
  flex: 1;
  text-align: center;
  font-size: 10px;
  color: var(--text-muted);
  padding: .3rem 0;
  border-radius: 4px;
  transition: background .3s, color .3s;
}
.calc-band-seg small { display: block; font-size: 9px; opacity: .7; }
.calc-band-seg.active {
  background: var(--bg-card);
  color: var(--text-primary);
  font-weight: 600;
  border: 1px solid var(--border);
}

/* Piattaforme grid */
.calc-platforms-section {
  margin-bottom: 2rem;
}
.calc-platforms-section h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.calc-platforms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

/* Platform card */
.calc-pl-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--pl-color, var(--accent));
  transition: transform .2s, box-shadow .2s;
}
.calc-pl-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md, 0 4px 12px rgba(0,0,0,.15));
}
.calc-pl-card-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
}
.calc-pl-icon { display: flex; align-items: center; }
.calc-pl-name { font-size: 13px; font-weight: 600; color: var(--text-primary); }
.calc-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
}
.calc-pl-handle { font-size: 11px; color: var(--text-muted); margin-bottom: .2rem; }
.calc-pl-fullname { font-size: 12px; color: var(--text-secondary); margin-bottom: .5rem; }

.calc-pl-stats {
  display: flex;
  gap: .8rem;
  margin-bottom: .6rem;
}
.calc-pl-stat { display: flex; flex-direction: column; }
.calc-pl-stat-val { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.calc-pl-stat-label { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }

.calc-pl-scorebar {
  height: 4px;
  background: var(--bg-secondary);
  border-radius: 2px;
  overflow: hidden;
}
.calc-pl-scorebar-fill {
  height: 100%;
  border-radius: 2px;
}

/* Errori */
.calc-errors {
  background: rgba(239,68,68,.05);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.5rem;
}
.calc-errors h3 {
  font-size: 12px;
  font-weight: 600;
  color: #ef4444;
  margin-bottom: .5rem;
}
.calc-error-item {
  font-size: 12px;
  color: var(--text-secondary);
  padding: .3rem 0;
  border-bottom: 1px solid rgba(239,68,68,.1);
}
.calc-error-item:last-child { border-bottom: none; }

/* Azioni post-risultato */
.calc-result-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.calc-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: .5rem 1.2rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.calc-action-btn:hover {
  border-color: var(--primary);
  background: rgba(13,148,136,.04);
}

/* CTA */
.calc-cta {
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  box-shadow: var(--shadow);
}
.calc-cta-icon { margin-bottom: .75rem; }
.calc-cta h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .5rem;
}
.calc-cta p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 1.2rem;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* FAQ rapide */
.calc-faq {
  margin-top: 2.5rem;
}
.calc-faq h2 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: 1rem;
  text-align: center;
}
.calc-faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.calc-faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.calc-faq-item summary {
  padding: .8rem 1rem;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.calc-faq-item summary::-webkit-details-marker { display: none; }
.calc-faq-item summary::after {
  content: '+';
  font-size: 16px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform .2s;
}
.calc-faq-item[open] summary::after {
  content: '−';
}
.calc-faq-item p {
  padding: 0 1rem .8rem;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 700px) {
  .calc-steps {
    flex-direction: column;
    gap: 10px;
  }
  .calc-step-arrow {
    display: none;
  }
  .calc-hero h1 { font-size: 1.5rem; }
  .calc-platforms-grid { grid-template-columns: 1fr; }
  .calc-score-ring { width: 110px; height: 110px; }
  .calc-ring-value { font-size: 2.2rem; }
  .calc-form-footer { flex-direction: column; align-items: stretch; }
  .calc-submit-btn { width: 100%; justify-content: center; }
  .calc-result-actions { flex-direction: column; }
  .calc-action-btn { justify-content: center; }
}

/* ========== AI FEATURES STYLES ========== */

/* --- Brand Dashboard: AI Brief --- */
.bd-ai-section {
  padding: 1.2rem;
}
.bd-ai-header { margin-bottom: 1.2rem; }
.bd-ai-header h3 { font-size: 15px; font-weight: 600; margin-bottom: .3rem; }
.bd-ai-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.bd-ai-brief-pre {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text-secondary);
  max-height: 400px;
  overflow-y: auto;
  margin-top: 1rem;
}

/* --- Brand Dashboard: ROI --- */
.bd-roi-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin: 1rem 0;
}
.bd-roi-metric {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .8rem;
  text-align: center;
  box-shadow: var(--shadow);
}
.bd-roi-metric--highlight {
  border-color: var(--primary);
  background: rgba(13, 148, 136, .05);
}
.bd-roi-metric-val {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.bd-roi-metric-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: .2rem;
}
.bd-roi-result-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .6rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.bd-roi-result-card:last-child { border-bottom: none; }
.bd-roi-result-date { color: var(--text-muted); font-size: 12px; min-width: 80px; }
.bd-roi-result-stats {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--text-secondary);
  font-size: 12px;
}
.bd-roi-score {
  font-weight: 600;
  color: var(--primary);
}

/* --- Smart Alerts --- */
.bd-alert-card {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: .8rem 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .2s;
}
.bd-alert-card:hover { background: var(--bg-secondary); }
.bd-alert-card.bd-alert-read { opacity: .55; }
.bd-alert-icon { font-size: 20px; flex-shrink: 0; }
.bd-alert-body { flex: 1; min-width: 0; }
.bd-alert-msg { font-size: 13px; color: var(--text-primary); line-height: 1.4; }
.bd-alert-meta { display: flex; align-items: center; gap: 8px; margin-top: .3rem; }
.bd-alert-severity {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  text-transform: uppercase;
}
.bd-alert-time { font-size: 11px; color: var(--text-muted); }

/* --- Profile: AI Section --- */
.profile-ai-section { margin-top: 1.5rem; }
.profile-ai-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.btn-ai-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: .5rem 1rem;
  font-size: 12px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-ai-action:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(13, 148, 136, .05);
}
.profile-ai-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.profile-ai-card h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: .8rem;
  color: var(--text-primary);
}
.profile-ai-row {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: .5rem;
  line-height: 1.5;
}
.ai-keyword-tag {
  display: inline-block;
  padding: 2px 8px;
  background: rgba(13, 148, 136, .1);
  border-radius: 10px;
  font-size: 11px;
  color: var(--primary);
  margin: 2px 2px;
}
.ai-safety-score {
  font-weight: 700;
  color: var(--primary);
}
.profile-ai-report-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.profile-ai-report-text h3,
.profile-ai-report-text h4,
.profile-ai-report-text h5 {
  color: var(--text-primary);
  margin: 1.2em 0 0.4em;
}
.profile-ai-report-text h3 { font-size: 16px; }
.profile-ai-report-text h4 { font-size: 14px; }
.profile-ai-report-text h5 { font-size: 13px; color: var(--primary); }
.profile-ai-report-text hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1em 0;
}
.profile-ai-report-text ul {
  padding-left: 1.2em;
  margin: 0.5em 0;
}
.profile-ai-report-text li {
  margin-bottom: 0.3em;
}
.profile-ai-report-text strong {
  color: var(--text-primary);
  font-weight: 600;
}
.ai-report-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0.8em 0;
  font-size: 12px;
}
.ai-report-table th,
.ai-report-table td {
  padding: 6px 10px;
  border: 1px solid var(--border);
  text-align: left;
}
.ai-report-table th {
  background: var(--surface);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.ai-report-table tr:nth-child(even) td {
  background: var(--surface);
}

/* --- Demographics Bars --- */
.demo-section { margin-bottom: 1rem; }
.demo-section h5 {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
  margin-bottom: .5rem;
}
.demo-bars { display: flex; flex-direction: column; gap: 4px; }
.demo-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.demo-bar-label {
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 70px;
  text-align: right;
}
.demo-bar-bg {
  flex: 1;
  height: 8px;
  background: var(--bg-secondary);
  border-radius: 4px;
  overflow: hidden;
}
.demo-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 4px;
  transition: width .5s ease;
}
.demo-bar-val {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary);
  min-width: 35px;
}

/* --- Creator Dashboard: Media Kit --- */
.cdash-mk-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.cdash-mk-preview {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
}
.cdash-mk-preview h4 {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .8rem;
}

/* --- Responsive for AI features --- */
@media (max-width: 768px) {
  .bd-roi-summary-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-ai-buttons { flex-direction: column; }
  .bd-roi-result-stats { font-size: 11px; gap: 6px; }
}

/* --- Admin: AI Categorize Button --- */
.btn-ai-categorize {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-ai-categorize:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* =============================================
   PROFILE DETAIL — Redesigned v2
   Fluenk palette: teal × cyan × lime
   ============================================= */
:root {
  --prf-accent:        #0D9488;
  --prf-accent-hover:  #0F766E;
  --prf-accent-glow:   rgba(13, 148, 136, 0.14);
  --prf-accent-light:  #06B6D4;
  --prf-secondary:     #A8F042;
  --prf-secondary-glow:rgba(168, 240, 66, 0.10);
  --prf-gold:          #FFD233;
}

/* ---- Two-column layout ---- */
.profile-layout {
  display: flex;
  gap: 22px;
  align-items: flex-start;
}

/* ---- SIDEBAR ---- */
.prf-sidebar {
  width: 258px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--header-h) + 16px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Avatar card */
.prf-avatar-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 26px 20px 18px;
  position: relative;
  overflow: hidden;
}
.prf-avatar-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--prf-accent), var(--prf-secondary));
  border-radius: var(--radius) var(--radius) 0 0;
}
.prf-avatar-ring-wrap {
  position: relative;
  width: 96px;
  height: 96px;
  margin-bottom: 13px;
  flex-shrink: 0;
}
.prf-avatar-ring-wrap::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--prf-accent), var(--prf-secondary), var(--prf-accent-light), var(--prf-accent));
  animation: prf-ring-spin 5s linear infinite;
}
.prf-avatar-ring-wrap::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  background: var(--bg-card);
}
@keyframes prf-ring-spin { to { transform: rotate(360deg); } }

.prf-avatar-ring-wrap .rank-avatar,
.prf-avatar-ring-wrap .default-avatar {
  position: relative !important;
  z-index: 1;
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  border: none !important;
  font-size: 36px !important;
}
.prf-sidebar-name {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 3px;
  line-height: 1.25;
}
.prf-sidebar-verified {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px; height: 16px;
  background: var(--prf-accent);
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  flex-shrink: 0;
}
.prf-sidebar-verified svg { display: block; }
.prf-sidebar-handle {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 10px;
}
.prf-sidebar-rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: var(--prf-accent-glow);
  border: 1px solid rgba(13,148,136,0.22);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--prf-accent-light);
  margin-bottom: 12px;
}
/* stat row: followers / following / posts */
.prf-stat-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  width: 100%;
  border-top: 1px solid var(--border-light);
  margin-top: 4px;
  padding-top: 10px;
}
.prf-stat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border-right: 1px solid var(--border-light);
}
.prf-stat-cell:last-child { border-right: none; }
.prf-stat-val {
  font-size: 14px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  margin-bottom: 2px;
}
.prf-stat-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
}

/* small shared card */
.prf-sc {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
}

/* bio card */
.prf-bio-card {
  padding: 13px 15px;
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* platform icons */
.prf-platform-icons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px;
}
.prf-plat-link {
  width: 34px; height: 34px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none;
  font-size: 15px;
  transition: transform 0.15s, box-shadow 0.15s;
}
.prf-plat-link:hover { transform: scale(1.12); box-shadow: 0 4px 12px rgba(0,0,0,0.3); }

/* category tags */
.prf-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding: 12px 14px;
}
.prf-cat-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  background: var(--prf-accent-glow);
  color: var(--prf-accent-light);
  border: 1px solid rgba(13,148,136,0.2);
}

/* meta: location, language */
.prf-meta-card { padding: 12px 15px; display: flex; flex-direction: column; gap: 7px; }
.prf-meta-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--text-secondary);
}
.prf-meta-icon { width: 18px; height: 18px; color: var(--prf-accent-light); display:flex;align-items:center;justify-content:center;flex-shrink:0; }

/* sidebar action buttons */
.prf-actions { display: flex; flex-direction: column; gap: 7px; }
.prf-action-row { display: flex; gap: 6px; }
.prf-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
  white-space: nowrap;
}
.prf-btn:hover {
  color: var(--prf-accent-light);
  border-color: rgba(13,148,136,0.3);
  background: var(--prf-accent-glow);
}
.prf-btn.fav-btn {
  opacity: 1 !important; /* always visible in sidebar */
  font-size: 16px;
  padding: 7px;
}
.prf-sidebar .fav-btn { opacity: 1 !important; }
.prf-timestamp {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
  padding: 8px 10px;
}

/* ---- MAIN content ---- */
.prf-main { flex: 1; min-width: 0; }

/* tabs */
.prf-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 2px;
}
.prf-tabs-nav::-webkit-scrollbar { display: none; }
.prf-tab-btn {
  padding: 10px 18px;
  background: none;
  border: none;
  border-bottom: 2.5px solid transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  transition: color var(--transition-fast), border-color var(--transition-fast);
  margin-bottom: -1px;
  font-family: var(--font);
}
.prf-tab-btn:hover { color: var(--text-secondary); }
.prf-tab-btn.active {
  color: var(--prf-accent-light);
  border-bottom-color: var(--prf-accent);
}
.prf-tab-pane { display: none; }
.prf-tab-pane.active { display: block; }

/* Fluenk Score bar card */
.prf-score-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  padding: 22px 24px;
  margin-bottom: 16px;
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
}
.prf-score-label-col { flex-shrink: 0; }
.prf-score-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin-bottom: 3px;
}
.prf-score-value {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -1.5px;
  line-height: 1;
}
.prf-score-band-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 20px;
  margin-top: 5px;
  display: inline-block;
}
.prf-score-bar-col { flex: 1; min-width: 140px; }
.prf-score-bar-bg {
  height: 7px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
  margin-bottom: 6px;
}
.prf-score-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 1.1s cubic-bezier(0.4,0,0.2,1);
}
.prf-score-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  color: var(--text-muted);
  font-weight: 600;
}

/* KPI grid: 2 columns */
.prf-kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.prf-kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-subtle);
  padding: 22px 22px 16px;
  display: flex;
  flex-direction: column;
  min-height: 200px;
  transition: box-shadow var(--transition-fast), transform var(--transition-fast);
}
.prf-kpi-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.prf-kpi-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}
.prf-kpi-sub { font-size: 10px; color: var(--text-muted); margin-bottom: 6px; }
.prf-kpi-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  margin-bottom: 6px;
  width: fit-content;
}
.prf-kpi-trend.up   { background: rgba(74,222,128,0.12); color: #4ADE80; }
.prf-kpi-trend.down { background: rgba(248,113,113,0.12); color: #F87171; }
.prf-kpi-trend.flat { background: rgba(250,204,21,0.12);  color: #FACC15; }
.prf-kpi-value {
  font-size: 32px;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 6px;
}
.prf-kpi-compare {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.prf-kpi-compare-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.prf-kpi-body {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex: 1;
}
.prf-kpi-metrics-col { display: flex; flex-direction: column; gap: 10px; min-width: 90px; }
.prf-kpi-metric { display: flex; flex-direction: column; }
.prf-kpi-metric-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}
.prf-kpi-metric-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-top: 2px;
}
.prf-kpi-chart { flex: 1; min-height: 70px; min-width: 0; position: relative; }
.prf-kpi-chart canvas { width: 100% !important; }

/* section title inside panes */
.prf-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
  margin: 16px 0 10px;
}

/* IG engagement grid */
.prf-ig-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.prf-ig-card {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 13px;
  text-align: center;
  border: 1px solid var(--border-light);
}
.prf-ig-val {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 3px;
}
.prf-ig-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}

/* History chart card */
.prf-history-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 18px 20px;
  margin-bottom: 14px;
}
.prf-chart-wrap { height: 170px; position: relative; overflow: hidden; }
.prf-chart-wrap canvas,
.prf-history-card canvas { width: 100% !important; max-width: 100%; }

/* Analytics tab */
.prf-analytics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.prf-analytics-metric {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.prf-analytics-val { font-size: 22px; font-weight: 800; line-height: 1; }
.prf-analytics-lbl {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  text-align: center;
}
.prf-analytics-chart-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border-light);
  padding: 18px 20px;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .profile-layout {
    flex-direction: column;
    gap: 14px;
  }
  .prf-sidebar {
    width: 100%;
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .prf-avatar-section {
    flex: 0 0 100%;
    flex-direction: row;
    gap: 16px;
    text-align: left;
    align-items: flex-start;
    padding: 18px;
  }
  .prf-avatar-section::before { border-radius: 0; }
  .prf-sidebar-name,
  .prf-sidebar-handle { text-align: left; }
  .prf-avatar-ring-wrap { margin-bottom: 0; }
  .prf-stat-row { max-width: 280px; padding-top: 10px; }
  .prf-sc, .prf-actions { flex: 1 1 auto; min-width: 140px; }
  .prf-kpi-grid { grid-template-columns: 1fr; }
  .prf-analytics-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .prf-kpi-value { font-size: 26px; }
  .prf-score-value { font-size: 34px; }
  .prf-sidebar-name { font-size: 15px; }
  .prf-analytics-grid { grid-template-columns: 1fr 1fr; }

  /* Su piccoli schermi reimposta la sezione avatar a colonna centrata */
  .prf-avatar-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px 16px 16px;
  }
  .prf-avatar-ring-wrap { margin-bottom: 10px; }
  .prf-sidebar-name,
  .prf-sidebar-handle { text-align: center; }
  .prf-stat-row { max-width: 100%; padding-top: 10px; }
}

/* ============ SEARCH AUTOCOMPLETE ============ */
.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white !important;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin-top: 4px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  z-index: 1000;
  max-height: 320px;
  overflow-y: auto;
}
.suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.suggest-item:hover { background: var(--bg-hover); }
.suggest-item:first-child { border-radius: 12px 12px 0 0; }
.suggest-item:last-child { border-radius: 0 0 12px 12px; }
.suggest-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
}
.suggest-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.suggest-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.suggest-handle {
  font-size: 11px;
  color: var(--text-muted);
}
.suggest-score {
  font-weight: 700;
  font-size: 14px;
  color: var(--primary);
  background: rgba(13,148,136,0.15);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ============ DELIVERABLES CALENDAR ============ */
.cdash-deliv-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 4px;
}
.deliv-view-btn {
  background: transparent;
  border: none;
  padding: 6px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.deliv-view-btn:hover { color: var(--text); }
.deliv-view-btn.active {
  background: var(--primary);
  color: #fff;
}
.cdash-deliverables-calendar {
  padding: 16px 0;
}
.deliv-calendar-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
}
.deliv-cal-arrow {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.15s;
}
.deliv-cal-arrow:hover { background: var(--primary); color: #fff; border-color: var(--primary); }
#deliv-cal-month-label {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  min-width: 140px;
  text-align: center;
}
.deliv-calendar-grid { width: 100%; }
.deliv-cal-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 8px;
}
.deliv-cal-header span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}
.deliv-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.deliv-cal-day {
  min-height: 64px;
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.deliv-cal-day--empty { background: transparent; }
.deliv-cal-day--today {
  border: 2px solid var(--primary);
  background: rgba(13,148,136,0.1);
}
.deliv-cal-day--has-events { background: var(--card-bg); }
.deliv-cal-day-num {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}
.deliv-cal-day--today .deliv-cal-day-num { color: var(--primary); }
.deliv-cal-events {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.deliv-cal-event {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.deliv-cal-event--pending { background: #F59E0B; color: #fff; }
.deliv-cal-event--submitted { background: #3B82F6; color: #fff; }
.deliv-cal-event--approved { background: #22C55E; color: #fff; }
.deliv-cal-event--more { background: var(--bg-secondary); color: var(--text-muted); }

@media (max-width: 640px) {
  .deliv-cal-day { min-height: 48px; padding: 4px; }
  .deliv-cal-event { font-size: 8px; padding: 1px 4px; }
  .deliv-cal-day-num { font-size: 10px; }
}

/* ============ SIZE TIER BADGE ============ */
.prf-tier-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  padding: 3px 10px;
  border-radius: 20px;
  margin-top: 4px;
}

/* ============ SIMILAR CREATORS ============ */
.prf-similar-section {
  margin-top: 10px;
  padding-left: 20px;
  padding-right: 20px;
  padding-bottom: 10px;
}
.prf-similar-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  transition: background .15s;
}
.prf-similar-item:hover { background: rgba(255,255,255,0.03); border-radius: 6px; padding-inline: 4px; }
.prf-similar-item:last-child { border-bottom: none; }
.prf-similar-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden; flex-shrink: 0;
  background: var(--bg-secondary);
  display: flex; align-items: center; justify-content: center;
}
.prf-similar-avatar img { width: 100%; height: 100%; object-fit: cover; }
.prf-similar-info { flex: 1; min-width: 0; }
.prf-similar-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prf-similar-handle { font-size: 10px; color: var(--text-muted); }
.prf-similar-score {
  font-size: 12px; font-weight: 700; color: #0D9488;
  background: rgba(13,148,136,0.1); padding: 2px 6px; border-radius: 8px;
}

/* ============ GROWTH SECTION ============ */
.prf-growth-grid, .prf-audience-growth {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px;
}
.prf-growth-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 10px; padding: 14px; text-align: center;
}
.prf-growth-val { font-size: 20px; font-weight: 800; display: block; }
.prf-growth-val.up { color: #4ADE80; }
.prf-growth-val.down { color: #FF3A5C; }
.prf-growth-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.prf-growth-chart-wrap { height: 260px; margin-top: 10px; }

/* ============ BEST POSTING TIME ============ */
.prf-best-time-card, .prf-best-posting-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 10px; padding: 14px;
}
.prf-best-time-icon, .prf-best-posting-icon { font-size: 28px; }
.prf-best-time-val, .prf-best-posting-time { font-size: 22px; font-weight: 800; color: #06B6D4; }
.prf-best-time-day, .prf-best-posting-day { font-size: 12px; color: var(--text-muted); }
.prf-best-posting-info { flex: 1; }
.prf-best-posting-desc { font-size: 11px; color: var(--text-muted); }

/* ============ AUDIENCE TAB ============ */
.prf-audience-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px;
}
.prf-audience-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 16px; text-align: center;
}
.prf-audience-card-title { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.prf-audience-tier { font-size: 28px; font-weight: 900; letter-spacing: 2px; }
.prf-audience-tier-range { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.prf-audience-lang-code { font-size: 26px; font-weight: 800; color: #06B6D4; }
.prf-audience-lang-bar { height: 6px; background: rgba(255,255,255,0.08); border-radius: 3px; margin: 8px 0 4px; overflow: hidden; }
.prf-audience-lang-fill { height: 100%; background: #06B6D4; border-radius: 3px; transition: width .5s; }
.prf-audience-lang-pct { font-size: 12px; color: var(--text-muted); }
.prf-audience-reach { font-size: 24px; font-weight: 800; color: #0D9488; }
.prf-audience-plat-count { font-size: 28px; font-weight: 800; color: var(--fluenk-accent); }
.prf-audience-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

/* ============ INTERAZIONI TAB ============ */
.prf-interact-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px;
}
.prf-interact-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 16px;
}
.prf-interact-label { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.prf-interact-val { font-size: 20px; font-weight: 700; color: var(--text-primary); }
.prf-interact-desc { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.prf-interact-plat-grid { display: flex; flex-direction: column; gap: 8px; }
.prf-interact-plat-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 10px; padding: 10px 14px;
}
.prf-interact-plat-icon { flex-shrink: 0; }
.prf-interact-plat-name { width: 80px; font-size: 12px; font-weight: 600; }
.prf-interact-plat-er { width: 50px; font-size: 13px; font-weight: 700; text-align: right; }
.prf-interact-plat-bar { flex: 1; height: 6px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; }
.prf-interact-plat-fill { height: 100%; border-radius: 3px; transition: width .4s; }

/* ============ POST TAB ============ */
.prf-post-stats-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
}
.prf-post-stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 16px; text-align: center;
}
.prf-post-stat-val { font-size: 22px; font-weight: 800; color: var(--text-primary); display: block; }
.prf-post-stat-lbl { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.prf-post-plat-grid { display: flex; flex-direction: column; gap: 10px; }
.prf-post-plat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 14px;
}
.prf-post-plat-header { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13px; margin-bottom: 10px; }
.prf-post-plat-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px; }
.prf-post-plat-metrics > div { text-align: center; }
.prf-post-plat-val { font-size: 15px; font-weight: 700; display: block; color: var(--text-primary); }
.prf-post-plat-lbl { font-size: 10px; color: var(--text-muted); }

/* ============ COLLABORAZIONI TAB ============ */
.prf-collab-list { display: flex; flex-direction: column; gap: 10px; }
.prf-collab-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle, rgba(255,255,255,0.06));
  border-radius: 12px; padding: 14px;
}
.prf-collab-brand { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.prf-collab-campaign { font-size: 12px; color: #06B6D4; margin-top: 2px; }
.prf-collab-desc { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.prf-collab-date { font-size: 11px; color: var(--text-muted); margin-top: 6px; }
.prf-collab-empty { text-align: center; padding: 30px 0; }

/* ============ RESPONSIVE NEW TABS ============ */
@media (max-width: 640px) {
  .prf-audience-grid { grid-template-columns: 1fr 1fr; }
  .prf-interact-grid { grid-template-columns: 1fr; }
  .prf-post-stats-grid { grid-template-columns: 1fr 1fr; }
  .prf-growth-chart-wrap { height: 200px; }
  .prf-similar-section { max-height: 200px; overflow-y: auto; }
}

/* ====================================================================
   PROFILE DETAIL — MOBILE RESPONSIVE OVERHAUL
   ==================================================================== */

/* ---- 860px: Enhance existing tablet/mobile stacking ---- */
@media (max-width: 860px) {
  /* Prevent any horizontal overflow on the profile page */
  .profile-layout {
    overflow: hidden;
  }
  .prf-main {
    overflow: hidden;
    width: 100%;
  }

  /* Sidebar sub-cards: 2-column flow for bio, actions, meta, etc. */
  .prf-sidebar {
    gap: 8px;
  }
  .prf-bio-card { order: 1; }
  .prf-platform-icons { order: 2; }
  .prf-cats { order: 3; }
  .prf-meta-card { order: 4; }
  .prf-actions { order: 5; flex: 1 1 100%; }
  .prf-similar-section { order: 6; flex: 1 1 100%; max-height: 160px; overflow-y: auto; }
  .prf-timestamp { order: 7; flex: 1 1 100%; }

  /* Score card: ensure it wraps properly */
  .prf-score-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 18px;
  }
  .prf-score-bar-col { width: 100%; min-width: 0; }

  /* KPI cards: remove min-height, stack body vertically */
  .prf-kpi-card {
    min-height: auto;
    padding: 18px 16px 14px;
  }
  .prf-kpi-body {
    flex-direction: column;
    align-items: stretch;
  }
  .prf-kpi-metrics-col {
    flex-direction: row;
    gap: 16px;
    min-width: 0;
  }
  .prf-kpi-chart {
    width: 100%;
    min-height: 100px;
    max-height: 140px;
  }

  /* Chart containers: prevent overflow */
  .prf-chart-wrap {
    height: 160px;
    overflow: hidden;
  }
  .prf-history-card {
    overflow: hidden;
  }

  /* IG grid: 3 columns that fit */
  .prf-ig-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
  .prf-ig-card { padding: 10px 8px; }
  .prf-ig-val { font-size: 14px; }
  .prf-ig-lbl { font-size: 8px; }

  /* Tab buttons: better tap targets */
  .prf-tab-btn {
    padding: 10px 14px;
    font-size: 12px;
  }
  .prf-tabs-nav {
    margin-bottom: 16px;
    /* Fade indicator for scrollable tabs */
    -webkit-mask-image: linear-gradient(to right, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, black 90%, transparent 100%);
  }

  /* Analytics grid */
  .prf-analytics-grid { grid-template-columns: repeat(2, 1fr); }
  .prf-analytics-chart-card { padding: 14px; overflow: hidden; }
}

/* ---- 640px: Mobile ---- */
@media (max-width: 640px) {
  /* Container padding */
  .profile-container { padding: 44px 10px 0; }
  .profile-layout { gap: 10px; }

  /* Compact sidebar: hide similar creators, reduce avatar */
  .prf-avatar-ring-wrap { width: 80px; height: 80px; margin-bottom: 10px; }
  .prf-avatar-ring-wrap .rank-avatar,
  .prf-avatar-ring-wrap .default-avatar {
    width: 80px !important;
    height: 80px !important;
    font-size: 30px !important;
  }
  .prf-avatar-section { padding: 20px 16px 14px; }
  .prf-sidebar-name { font-size: 16px; }
  .prf-sidebar-handle { margin-bottom: 6px; }
  .prf-sidebar-rank-badge { font-size: 10px; padding: 2px 8px; margin-bottom: 8px; }

  /* Stat row: compact */
  .prf-stat-val { font-size: 13px; }
  .prf-stat-lbl { font-size: 8px; }
  .prf-stat-cell { padding: 8px 2px; }

  /* Sidebar cards compact */
  /* Badge slot inside/near avatar section */
  #prf-custom-badges-slot {
    flex: 1 1 100%;
    padding: 4px 14px !important;
  }
  #prf-custom-badges-slot .custom-badges-wrap {
    justify-content: center;
    padding: 0;
  }
  #prf-custom-badges-slot .custom-badge-chip {
    font-size: 10px;
    padding: 2px 9px;
  }

  .prf-bio-card { padding: 10px 12px; font-size: 11px; }
  .prf-platform-icons { padding: 8px 12px; gap: 6px; }
  .prf-plat-link { width: 30px; height: 30px; border-radius: 8px; }
  .prf-cats { padding: 8px 12px; gap: 4px; }
  .prf-cat-tag { font-size: 10px; padding: 2px 7px; }
  .prf-meta-card { padding: 8px 12px; }
  .prf-meta-row { font-size: 11px; gap: 5px; }

  /* Action buttons: compact */
  .prf-action-row { gap: 4px; }
  .prf-btn { padding: 6px 8px; font-size: 10px; gap: 3px; border-radius: 8px; }

  /* Score card */
  .prf-score-card { padding: 16px 14px; gap: 12px; }
  .prf-score-value { font-size: 36px; }
  .prf-score-ticks { font-size: 8px; }

  /* KPI grid and cards */
  .prf-kpi-grid { gap: 12px; margin-bottom: 12px; }
  .prf-kpi-card { padding: 16px 14px 12px; }
  .prf-kpi-value { font-size: 28px; }
  .prf-kpi-label { font-size: 10px; }
  .prf-kpi-sub { font-size: 9px; }
  .prf-kpi-compare { font-size: 9px; margin-bottom: 8px; }
  .prf-kpi-metric-val { font-size: 14px; }
  .prf-kpi-metric-lbl { font-size: 8px; }
  .prf-kpi-chart { min-height: 80px; max-height: 120px; }

  /* IG grid: 2 columns on smaller screens */
  .prf-ig-grid { grid-template-columns: repeat(2, 1fr); }

  /* Chart heights */
  .prf-chart-wrap { height: 150px; }

  /* Section titles */
  .prf-section-title { font-size: 10px; margin: 12px 0 8px; }

  /* Tabs */
  .prf-tab-btn { padding: 9px 12px; font-size: 11px; }
  .prf-tabs-nav { margin-bottom: 14px; }

  /* Post stats */
  .prf-post-plat-metrics { grid-template-columns: repeat(2, 1fr); }
}

/* ---- 480px: Small mobile ---- */
@media (max-width: 480px) {
  .profile-container { padding: 44px 8px 0; }

  /* Further compact sidebar */
  .prf-avatar-ring-wrap { width: 72px; height: 72px; }
  .prf-avatar-ring-wrap .rank-avatar,
  .prf-avatar-ring-wrap .default-avatar {
    width: 72px !important;
    height: 72px !important;
    font-size: 26px !important;
  }
  .prf-avatar-section { padding: 16px 14px 12px; }
  .prf-sidebar-name { font-size: 15px; }

  /* Score */
  .prf-score-value { font-size: 30px; }
  .prf-score-card { padding: 14px 12px; gap: 10px; }

  /* KPI */
  .prf-kpi-value { font-size: 24px; }
  .prf-kpi-card { padding: 14px 12px 10px; }
  .prf-kpi-chart { min-height: 70px; max-height: 100px; }
  .prf-kpi-metrics-col { gap: 12px; }
  .prf-kpi-metric-val { font-size: 13px; }

  /* Analytics */
  .prf-analytics-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .prf-analytics-metric { padding: 12px 8px; }
  .prf-analytics-val { font-size: 18px; }
  .prf-analytics-lbl { font-size: 8px; }

  /* Chart */
  .prf-chart-wrap { height: 140px; }
  .prf-growth-chart-wrap { height: 180px; }
  .prf-history-card { padding: 12px 10px; }

  /* IG grid */
  .prf-ig-card { padding: 8px 6px; }
  .prf-ig-val { font-size: 13px; }

  /* Actions: 2 rows for share buttons */
  .prf-action-row { flex-wrap: wrap; }

  /* Similar creators */
  .prf-similar-section { max-height: 140px; }
  .prf-similar-item { gap: 8px; }
  .prf-similar-avatar { width: 28px; height: 28px; }
  .prf-similar-name { font-size: 11px; }
  .prf-similar-score { font-size: 12px; }

  /* Growth grid */
  .prf-growth-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ---- 360px: Very small mobile ---- */
@media (max-width: 360px) {
  .profile-container { padding: 44px 6px 0; }

  .prf-score-value { font-size: 26px; }
  .prf-kpi-value { font-size: 22px; }
  .prf-kpi-label { font-size: 9px; }
  .prf-tab-btn { padding: 8px 10px; font-size: 10px; }
  .prf-stat-val { font-size: 12px; }
  .prf-ig-grid { grid-template-columns: repeat(2, 1fr); }
  .prf-analytics-grid { grid-template-columns: 1fr; }
}

/* ========== AUDIENCE QUALITY (ranking card) ========== */
.rank-card-aq { display:flex; flex-direction:column; align-items:center; gap:2px; }
.rank-card-aq .aq-value { font-size:13px; font-weight:700; color:#A78BFA; }
.rank-card-aq .aq-label { font-size:9px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; }

/* ========== AUDIENCE QUALITY (profile) ========== */
.prf-aq-card { text-align:center; }
.prf-aq-ring { display:flex; justify-content:center; margin:6px 0; }

/* ========== EMBED SECTION (profile sidebar) ========== */
.prf-embed-section { padding:12px; }
.prf-embed-label { font-size:11px; color:var(--text-muted); margin-bottom:6px; }
.prf-embed-preview { margin-bottom:8px; border-radius:10px; overflow:hidden; background:var(--bg-elevated, #F5F5F7); }
.prf-embed-code-wrap { display:flex; align-items:center; gap:4px; background:var(--bg-elevated, #F5F5F7); border:1px solid var(--border-light); border-radius:10px; padding:6px 8px; }
.prf-embed-code { font-size:10px; color:var(--text-muted); word-break:break-all; flex:1; font-family:monospace; }
.prf-embed-copy { background:none; border:none; cursor:pointer; font-size:14px; padding:2px; opacity:.7; transition:opacity .15s; }
.prf-embed-copy:hover { opacity:1; }
.prf-btn-seo { font-size:12px; background:var(--primary-bg); color:var(--primary); border:1px solid var(--primary-glow); border-radius:10px; }
.prf-btn-seo:hover { background:var(--primary-glow); }

/* Instagram embed (profile sidebar) */
.prf-ig-embed-section { padding: 12px; }
.prf-ig-embed-frame-wrap {
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-elevated, #F5F5F7);
}
.prf-ig-embed-frame {
  display: block;
  width: 100%;
  height: 430px;
  border: 0;
  background: transparent;
}

@media (max-width: 640px) {
  .prf-ig-embed-frame { height: 390px; }
}

@media (max-width: 480px) {
  .prf-ig-embed-frame { height: 360px; }
}

/* ========== COMPETITOR TRACKING ========== */
.comp-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(280px, 1fr)); gap:12px; }
.comp-card { background:#fff; border:1px solid var(--border-light); border-radius:10px; padding:14px; transition:border-color .15s, box-shadow .15s; box-shadow:var(--shadow); }
.comp-card:hover { border-color:var(--primary); box-shadow:var(--shadow-card-hover); }
.comp-card-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.comp-card-avatar { width:40px; height:40px; border-radius:50%; overflow:hidden; background:var(--bg-elevated); flex-shrink:0; }
.comp-card-avatar img { width:100%; height:100%; object-fit:cover; }
.comp-card-info { flex:1; min-width:0; }
.comp-card-name { font-weight:600; font-size:13px; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.comp-card-handle { font-size:11px; color:var(--text-muted); }
.comp-card-remove { background:none; border:none; color:var(--text-muted); font-size:14px; cursor:pointer; padding:4px 6px; border-radius:4px; transition:all .15s; }
.comp-card-remove:hover { color:var(--clr-danger); background:rgba(185,28,28,.08); }
.comp-card-metrics { display:grid; grid-template-columns:repeat(auto-fit, minmax(60px, 1fr)); gap:6px; text-align:center; }
.comp-val { display:block; font-size:14px; font-weight:700; color:var(--text); }
.comp-lbl { display:block; font-size:9px; color:var(--text-muted); text-transform:uppercase; letter-spacing:.5px; }
.comp-chart-wrap { height:220px; background:#fff; border:1px solid var(--border-light); border-radius:10px; padding:10px; margin-bottom:8px; box-shadow:var(--shadow); }

@media (max-width: 600px) {
  .comp-grid { grid-template-columns:1fr; }
  .comp-chart-wrap { height:180px; }
}

/* ========== CLUBS ========== */
.community-clubs-bar { display:flex; align-items:center; gap:12px; margin-bottom:16px; }

.clubs-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(320px, 1fr)); gap:14px; }

.club-card {
  display:flex; align-items:flex-start; gap:14px;
  background:#fff; border:1px solid var(--border-light);
  border-radius:10px; padding:16px; transition:border-color .2s, box-shadow .2s;
  box-shadow:var(--shadow);
}
.club-card:hover { border-color:var(--primary); box-shadow:var(--shadow-card-hover); }
.club-card.club-joined { border-color:var(--clr-success); background:rgba(21,128,61,.04); }

.club-avatar {
  width:48px; height:48px; border-radius:12px; flex-shrink:0;
  background:linear-gradient(135deg, var(--neon-lime), var(--fluenk-accent));
  color:#fff; font-size:20px; font-weight:700;
  display:flex; align-items:center; justify-content:center;
}
.club-info { flex:1; min-width:0; }
.club-name { font-size:15px; font-weight:700; color:var(--text); margin-bottom:2px; }
.club-meta { font-size:11px; color:var(--text-muted); margin-bottom:6px; }
.club-desc { font-size:12px; color:var(--text-secondary); line-height:1.4; display:-webkit-box; -webkit-box-orient:vertical; overflow:hidden; }

.club-actions { display:flex; flex-direction:column; gap:6px; flex-shrink:0; }
.bd-btn-primary-sm, .bd-btn-ghost-sm {
  font-size:11px; padding:5px 12px; border-radius:6px; border:none; cursor:pointer;
  font-weight:600; transition:all .15s; white-space:nowrap;
}
.bd-btn-primary-sm { background:var(--neon-lime); color:#fff; }
.bd-btn-primary-sm:hover { filter:brightness(1.1); }
.bd-btn-ghost-sm { background:var(--bg-elevated); color:var(--text-secondary); border:1px solid var(--border); }
.bd-btn-ghost-sm:hover { background:var(--border-light); color:var(--text); }

/* Club chat overlay */
.club-chat-overlay {
  position:fixed; inset:0; z-index:1000;
  background:var(--overlay-bg); backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  padding:20px;
}
.club-chat-wrap {
  width:100%; max-width:520px; max-height:80vh;
  background:var(--bg-surface); border:1px solid var(--border-light);
  border-radius:16px; display:flex; flex-direction:column; overflow:hidden;
  box-shadow:var(--shadow-lg);
}
.club-chat-header {
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px; border-bottom:1px solid var(--border-light);
}
.club-chat-header h4 { margin:0; font-size:16px; font-weight:700; color:var(--text); }

.club-chat-messages {
  flex:1; overflow-y:auto; padding:16px; min-height:200px; max-height:400px;
  display:flex; flex-direction:column; gap:10px;
}
.club-msg {
  background:var(--bg-elevated); border-radius:10px; padding:10px 14px;
  border:1px solid var(--border-light);
}
.club-msg-author { font-size:12px; font-weight:700; color:var(--primary); margin-bottom:3px; }
.club-msg-text { font-size:13px; color:var(--text); line-height:1.45; word-break:break-word; }
.club-msg-time { font-size:10px; color:var(--text-muted); margin-top:4px; text-align:right; }

.club-chat-input {
  display:flex; align-items:center; gap:8px;
  padding:12px 16px; border-top:1px solid var(--border-light);
}
.club-chat-input input {
  flex:1; background:var(--bg-elevated); border:1px solid var(--border);
  border-radius:8px; padding:10px 14px; color:var(--text);
  font-size:13px; outline:none; transition:border-color .15s;
}
.club-chat-input input::placeholder { color:var(--text-muted); }
.club-chat-input input:focus { border-color:var(--primary); }
.club-chat-input button {
  width:40px; height:40px; border-radius:10px; border:none;
  background:var(--neon-lime); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center;
  transition:filter .15s; flex-shrink:0;
}
.club-chat-input button:hover { filter:brightness(1.15); }

@media (max-width: 600px) {
  .clubs-grid { grid-template-columns:1fr; }
  .club-card { padding:12px; gap:10px; }
  .club-avatar { width:40px; height:40px; font-size:16px; border-radius:10px; }
  .club-chat-overlay { padding:10px; }
  .club-chat-wrap { max-height:90vh; border-radius:12px; }
  .club-chat-messages { max-height:50vh; }
}

/* ============================================================
   MISSIONE SOCIALE — OPPORTUNITÀ LOCALI
   ============================================================ */

/* ---- Pagina Opportunità ---- */
.opp-page { min-height: 100vh; }

.opp-hero {
  background: linear-gradient(135deg, rgba(13,148,136,.12) 0%, rgba(6,182,212,.06) 100%);
  border-bottom: 1px solid var(--border);
  padding: 32px 0 28px;
}
.opp-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.opp-hero-icon { font-size: 48px; flex-shrink: 0; line-height: 1; }
.opp-hero-text { flex: 1; min-width: 0; }
.opp-hero-title { font-size: 1.6rem; font-weight: 800; margin: 0 0 6px; }
.opp-hero-sub { font-size: .9rem; color: var(--text-secondary); margin: 0; line-height: 1.5; }
.opp-hero-actions { flex-shrink: 0; }

.opp-location-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--primary);
  border-radius: 20px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.opp-location-btn:hover { background: rgba(13,148,136,.1); }
.opp-location-btn.is-set { background: rgba(13,148,136,.12); }

/* ---- Filtri ---- */
.opp-filters { background: var(--bg-card); border-bottom: 1px solid var(--border); padding: 14px 0; }
.opp-filters-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.opp-filter-select {
  padding: 7px 12px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
}
.opp-filter-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}
.opp-count { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* ---- Manifesto ---- */
.opp-manifesto {
  max-width: var(--max-w);
  margin: 24px auto 0;
  padding: 0 24px;
}
.opp-manifesto-inner {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: rgba(234,179,8,.06);
  border: 1px solid rgba(234,179,8,.2);
  border-radius: 12px;
  padding: 16px 18px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--text-secondary);
}
.opp-manifesto-icon { font-size: 22px; flex-shrink: 0; line-height: 1; margin-top: 1px; }
.opp-manifesto-inner strong { color: var(--text); display: block; margin-bottom: 4px; }
.opp-manifesto-inner p { margin: 0; }
.opp-manifesto-inner em { color: var(--primary); font-style: normal; font-weight: 600; }

/* ---- Grid Opportunità ---- */
.opp-grid {
  max-width: var(--max-w);
  margin: 24px auto 0;
  padding: 0 24px 48px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

/* ---- Card Opportunità ---- */
.opp-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: border-color .2s, box-shadow .2s;
}
.opp-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 16px rgba(13,148,136,.12);
}
.opp-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.opp-card-labels { display: flex; gap: 6px; flex-wrap: wrap; }
.opp-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.opp-badge--type { background: rgba(99,102,241,.12); color: #818cf8; }
.opp-badge--locale { background: rgba(13,148,136,.12); color: var(--primary); }
.opp-badge--remote { background: rgba(16,185,129,.1); color: #10b981; }
.opp-badge--applied { background: rgba(234,179,8,.1); color: #ca8a04; }
.opp-card-company { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.opp-card-title { font-size: 15px; font-weight: 700; color: var(--text); margin: 0; }
.opp-card-desc { font-size: 13px; color: var(--text-secondary); line-height: 1.5; margin: 0; }

.opp-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-muted);
}
.opp-card-meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.opp-card-pay {
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.opp-card-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.opp-tag {
  padding: 2px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 11px;
  color: var(--text-secondary);
}
.opp-card-footer {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.opp-apply-btn {
  flex: 1;
  padding: 9px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s;
}
.opp-apply-btn:hover { opacity: .9; }
.opp-apply-btn:disabled { opacity: .5; cursor: default; }
.opp-apply-btn--done { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.opp-deadline { font-size: 11px; color: var(--text-muted); }
.opp-deadline.urgent { color: #ef4444; font-weight: 600; }

/* ---- Missione: preview nel Marketplace panel ---- */
.cdash-opp-section .cdash-inpanel-section-title svg { color: var(--primary); }
.cdash-opp-mission {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0 0 16px;
  padding: 10px 14px;
  background: rgba(13,148,136,.07);
  border-left: 3px solid var(--primary);
  border-radius: 0 6px 6px 0;
}

/* ---- Opp preview card (mini) ---- */
.opp-preview-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.opp-preview-card-info { flex: 1; min-width: 0; }
.opp-preview-card-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.opp-preview-card-company { font-size: 12px; color: var(--text-muted); }
.opp-preview-card-apply {
  padding: 6px 12px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: opacity .15s;
}
.opp-preview-card-apply:hover { opacity: .85; }
.opp-preview-card-apply.done { background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); cursor: default; }

/* ---- Hero location badge ---- */
.cdash-hero-location {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.cdash-location-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  background: rgba(13,148,136,.1);
  border: 1px solid rgba(13,148,136,.3);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: background .15s;
}
.cdash-location-pill:hover { background: rgba(13,148,136,.18); }
.cdash-sicilia-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(234,179,8,.1);
  border: 1px solid rgba(234,179,8,.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: #ca8a04;
}

/* ---- Badge Sicilia su campaign cards ---- */
.campaign-locale-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(13,148,136,.1);
  border: 1px solid rgba(13,148,136,.25);
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  color: var(--primary);
}

/* ---- Sezione candidature proprie ---- */
.opp-my-apps-section {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 48px;
}
.opp-section-title { font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.opp-app-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
}
.opp-app-info { flex: 1; min-width: 0; }
.opp-app-title { font-size: 14px; font-weight: 700; }
.opp-app-company { font-size: 12px; color: var(--text-muted); }
.opp-app-status {
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.opp-app-status.pending { background:rgba(99,102,241,.1); color:#818cf8; }
.opp-app-status.viewed { background:rgba(234,179,8,.1); color:#ca8a04; }
.opp-app-status.accepted { background:rgba(16,185,129,.1); color:#10b981; }
.opp-app-status.rejected { background:rgba(239,68,68,.1); color:#ef4444; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .opp-hero-inner { flex-direction: column; gap: 12px; }
  .opp-hero-icon { font-size: 36px; }
  .opp-hero-title { font-size: 1.25rem; }
  .opp-grid { grid-template-columns: 1fr; padding: 0 12px 36px; }
  .opp-filters-inner { gap: 8px; }
  .opp-filter-select { font-size: 12px; padding: 6px 10px; }
  .opp-manifesto { padding: 0 12px; }
}

/* ==================== F2: FILTER PRESETS ==================== */
.filter-presets-section { padding: 12px 0 0; }
.filter-presets-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-presets-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.filter-presets-list { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; }
.filter-preset-chip {
  background: var(--glass-bg, rgba(255,255,255,0.06));
  border: 1px solid rgba(13,148,136,.3);
  border-radius: 20px; padding: 4px 14px; font-size: 12px;
  color: var(--primary, #0D9488); cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.filter-preset-chip:hover { background: rgba(13,148,136,.15); }
.filter-preset-del { font-size: 14px; color: #F87171; font-weight: 700; margin-left: 2px; line-height: 1; }
.filter-preset-del:hover { color: #EF4444; }
.filter-preset-save-btn {
  background: none; border: 1px dashed rgba(13,148,136,.4); border-radius: 20px;
  padding: 4px 12px; font-size: 12px; color: var(--primary); cursor: pointer;
  transition: all .15s;
}
.filter-preset-save-btn:hover { border-color: var(--primary); background: rgba(13,148,136,.08); }

/* ==================== F5: DEAL STATUS ==================== */
.deal-status-wrap {
  display: flex; align-items: center; gap: 6px; margin-top: 8px; flex-wrap: wrap;
}
.deal-status-select {
  background: var(--glass-bg, rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 5px 8px; font-size: 12px;
  color: var(--text-primary, #F1F5F9); cursor: pointer;
}
.deal-value-input {
  background: var(--glass-bg, rgba(255,255,255,0.06));
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px; padding: 5px 8px; font-size: 12px;
  color: var(--text-primary); width: 90px;
}
.deal-save-btn {
  background: var(--primary, #0D9488); border: none; border-radius: 8px;
  padding: 5px 12px; font-size: 12px; color: #fff; cursor: pointer; font-weight: 600;
}
.deal-save-btn:hover { background: #06B6D4; }

/* ==================== F7: CREATOR POSTS ==================== */
.creator-new-post-form { margin-bottom: 20px; }
.creator-new-post-row { display: flex; gap: 8px; margin-top: 8px; align-items: center; flex-wrap: wrap; }
.creator-posts-list { display: flex; flex-direction: column; gap: 12px; }
.cp-item {
  background: var(--glass-bg, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px 16px;
}
.cp-item-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.cp-item-date { font-size: 11px; color: var(--text-muted); }
.cp-visibility-badge { font-size: 10px; padding: 2px 8px; border-radius: 12px; }
.cp-vis-public { background: rgba(13,148,136,.12); color: #0D9488; }
.cp-vis-friends { background: rgba(168,240,66,.12); color: #A8F042; }
.cp-del-btn { background: none; border: none; cursor: pointer; font-size: 14px; margin-left: auto; opacity: .6; }
.cp-del-btn:hover { opacity: 1; }
.cp-item-content { font-size: 14px; color: var(--text-primary); line-height: 1.5; white-space: pre-wrap; }
.cp-item-link { font-size: 12px; color: var(--primary); text-decoration: none; display: inline-block; margin-top: 6px; }
.cp-item-link:hover { text-decoration: underline; }
.cp-loading, .cp-empty { text-align: center; padding: 24px; color: var(--text-muted); font-size: 13px; }

/* Community posts feed */
.community-feed-header { margin-bottom: 16px; }
.community-feed-header h2 { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.community-posts-feed { display: flex; flex-direction: column; gap: 14px; }
.comm-post-item {
  background: var(--glass-bg, rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px; padding: 14px 16px;
}
.comm-post-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.comm-post-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.comm-post-username { font-weight: 600; font-size: 13px; color: var(--primary); }
.comm-post-date { font-size: 11px; color: var(--text-muted); margin-left: 4px; }
.comm-post-content { font-size: 14px; color: var(--text-primary); line-height: 1.5; white-space: pre-wrap; }
.comm-post-link { font-size: 12px; color: var(--primary); text-decoration: none; display: inline-block; margin-top: 6px; }

/* ==================== F8: CUSTOM BADGES ==================== */
.custom-badges-wrap { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 0; }
.custom-badge-chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 16px; font-size: 11px;
  font-weight: 600; color: #fff; white-space: nowrap;
}
/* Inline badge chips (ranking cards, admin cards, compare) */
.custom-badges-inline { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; margin: 4px 0; }
.custom-badge-chip-sm {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 7px; border-radius: 12px; font-size: 9.5px;
  font-weight: 600; color: #fff; white-space: nowrap; line-height: 1.4;
}
.admin-card-header .custom-badges-inline { justify-content: flex-start; margin: 2px 0 0 0; }
.prf-btn-note { width: 100%; }
.prf-btn-badge-add {
  background: none; border: 1px dashed rgba(13,148,136,.4); border-radius: 8px;
  padding: 4px 10px; font-size: 11px; color: var(--primary); cursor: pointer;
}
.prf-btn-badge-add:hover { background: rgba(13,148,136,.08); }

/* ==================== F9: PUSH TOGGLE ==================== */
.g-push-toggle-btn {
  background: var(--glass-bg, rgba(255,255,255,0.06));
  border: 1px solid rgba(13,148,136,.3);
  border-radius: 20px; padding: 6px 14px; font-size: 12px;
  color: var(--primary); cursor: pointer; transition: all .15s;
  margin-left: auto;
}
.g-push-toggle-btn:hover { background: rgba(13,148,136,.15); }
.g-push-toggle-btn.push-on {
  background: rgba(13,148,136,.15);
  border-color: var(--primary);
  color: #F1F5F9;
}

/* ==================== F10: EVENTS CALENDAR ==================== */
.events-calendar-wrap { padding: 0 20px 20px; }
.ev-cal-nav { display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 16px; }
.ev-cal-nav-btn {
  background: none; border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
  width: 32px; height: 32px; font-size: 18px; color: var(--text-primary);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.ev-cal-nav-btn:hover { background: var(--glass-bg); }
.ev-cal-month-label { font-size: 16px; font-weight: 700; color: var(--text-primary); text-transform: capitalize; min-width: 160px; text-align: center; }
.ev-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px;
}
.ev-cal-header-cell {
  text-align: center; font-size: 11px; font-weight: 600;
  color: var(--text-muted); padding: 6px 0; text-transform: uppercase;
}
.ev-cal-cell {
  background: var(--glass-bg, rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.04);
  border-radius: 8px; min-height: 74px; padding: 6px;
  position: relative; overflow: hidden;
}
.ev-cal-empty { background: transparent; border-color: transparent; }
.ev-cal-today { border-color: var(--primary) !important; }
.ev-cal-has-events { background: rgba(13,148,136,.06); }
.ev-cal-day-num { font-size: 13px; font-weight: 600; color: var(--text-primary); display: block; margin-bottom: 4px; }
.ev-cal-today .ev-cal-day-num { color: var(--primary); }
.ev-cal-dot-event {
  font-size: 10px; color: var(--primary); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; cursor: pointer;
  padding: 2px 4px; border-radius: 4px; background: rgba(13,148,136,.1);
  margin-bottom: 2px;
}
.ev-cal-dot-event:hover { background: rgba(13,148,136,.2); }
.ev-cal-more { font-size: 10px; color: var(--text-muted); }
.ev-cal-toggle {
  background: none; border: 1px solid rgba(13,148,136,.3); border-radius: 20px;
  padding: 6px 12px; font-size: 12px; cursor: pointer; color: var(--primary);
}
.ev-cal-toggle:hover { background: rgba(13,148,136,.1); }
@media (max-width: 640px) {
  .ev-cal-cell { min-height: 54px; padding: 4px; }
  .ev-cal-dot-event { font-size: 9px; }
}

/* ==================== F11: GLOBAL SEARCH MODAL ==================== */
.gs-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.55);
  z-index: 9999; display: flex; align-items: flex-start; justify-content: center;
  padding-top: min(20vh, 140px);
  backdrop-filter: blur(4px);
}
.gs-modal {
  background: var(--card-bg, #1A1A2E); border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px; width: 100%; max-width: 560px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.5); overflow: hidden;
}
.gs-modal-header {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.gs-modal-header svg { color: var(--text-muted); flex-shrink: 0; }
.gs-input {
  flex: 1; background: none; border: none; outline: none;
  font-size: 16px; color: var(--text-primary); font-family: inherit;
}
.gs-input::placeholder { color: var(--text-muted); }
.gs-kbd {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px; padding: 2px 8px; font-size: 11px; color: var(--text-muted);
  font-family: monospace;
}
.gs-results { max-height: 340px; overflow-y: auto; padding: 6px 0; }
.gs-result-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  cursor: pointer; transition: background .1s;
}
.gs-result-item:hover { background: rgba(13,148,136,.08); }
.gs-result-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.gs-result-icon { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.gs-result-info { flex: 1; min-width: 0; }
.gs-result-name { display: block; font-size: 14px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-result-sub { display: block; font-size: 12px; color: var(--text-muted); }
.gs-result-type-badge {
  background: rgba(13,148,136,.12); color: var(--primary); border-radius: 12px;
  padding: 2px 10px; font-size: 10px; font-weight: 600; white-space: nowrap;
}
.gs-type-event { background: rgba(234,179,8,.12); color: #ca8a04; }
.gs-loading, .gs-empty { text-align: center; padding: 20px; color: var(--text-muted); font-size: 13px; }

/* ==================== F12: AUDIT LOG ==================== */
.audit-log-wrap { overflow-x: auto; }
.audit-log-table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
.audit-log-table th {
  text-align: left; padding: 10px 12px; font-weight: 600;
  color: var(--text-muted); font-size: 11px; text-transform: uppercase;
  letter-spacing: .5px; border-bottom: 1px solid rgba(255,255,255,0.06);
}
.audit-log-table td {
  padding: 8px 12px; border-bottom: 1px solid rgba(255,255,255,0.03);
  color: var(--text-primary);
}
.audit-cell-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }
.audit-cell-admin { font-weight: 600; color: var(--primary); }
.audit-action-badge {
  background: rgba(13,148,136,.1); color: var(--primary); border-radius: 8px;
  padding: 2px 8px; font-size: 11px; font-weight: 600; white-space: nowrap;
}
.audit-cell-details { font-size: 12px; color: var(--text-muted); max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-log-pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 14px 0; }
.audit-pagination-info { font-size: 12px; color: var(--text-muted); }

/* ============ WEEKLY CHALLENGES ============ */
.challenges-grid { display: grid; gap: 12px; }
.challenge-card {
  background: var(--card-bg); border-radius: 14px; padding: 16px;
  display: flex; align-items: center; gap: 14px; border: 1px solid var(--border);
  transition: border-color .2s;
}
.challenge-card:hover { border-color: var(--primary); }
.challenge-done { opacity: .65; }
.challenge-icon { font-size: 28px; flex-shrink: 0; }
.challenge-info { flex: 1; min-width: 0; }
.challenge-label { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.challenge-progress-bar {
  height: 8px; background: var(--border); border-radius: 8px; overflow: hidden; margin-bottom: 4px;
}
.challenge-progress-fill {
  height: 100%; background: linear-gradient(90deg, var(--primary), var(--primary-light, #2dd4bf));
  border-radius: 8px; transition: width .4s ease;
}
.challenge-progress-text { font-size: 11px; color: var(--text-muted); }
.challenge-action { flex-shrink: 0; }
.challenge-claimed {
  font-size: 12px; color: var(--text-muted); font-style: italic;
}

/* ============ CREATOR ANALYTICS ============ */
.ca-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 18px; }
.ca-stat-card {
  background: var(--card-bg); border-radius: 14px; padding: 14px; text-align: center;
  border: 1px solid var(--border);
}
.ca-stat-val { font-size: 22px; font-weight: 700; color: var(--text); }
.ca-stat-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.ca-stat-delta { font-size: 12px; font-weight: 600; margin-top: 4px; }
.ca-stat-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.ca-growth-strip {
  display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px;
  padding: 10px 14px; background: var(--card-bg); border-radius: 12px; border: 1px solid var(--border);
}
.ca-growth-strip span { font-size: 12px; color: var(--text-muted); }
.ca-platforms { margin-bottom: 18px; }
.ca-platforms h4 { font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.ca-platform-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.ca-platform-card {
  background: var(--card-bg); border-radius: 12px; padding: 12px; text-align: center;
  border: 1px solid var(--border);
}
.ca-pl-icon { font-size: 22px; margin-bottom: 4px; }
.ca-pl-stat { font-size: 12px; color: var(--text-muted); }
.ca-pl-stat strong { color: var(--text); font-weight: 600; }

/* ============ CREATOR GOALS ============ */
.goals-list { display: grid; gap: 12px; }
.goal-card {
  background: var(--card-bg); border-radius: 14px; padding: 16px;
  border: 1px solid var(--border); transition: border-color .2s;
}
.goal-card:hover { border-color: var(--primary); }
.goal-done { border-color: var(--primary); background: rgba(13,148,136,.04); }
.goal-info { margin-bottom: 10px; }
.goal-type { font-weight: 600; font-size: 14px; text-transform: capitalize; }
.goal-values { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.goal-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ============ AI INSIGHTS ============ */
.insights-list { display: grid; gap: 12px; }
.ai-insight-card {
  background: var(--card-bg); border-radius: 14px; padding: 16px;
  display: flex; gap: 14px; border-left: 4px solid var(--border);
}
.ai-insight-card[data-type="positive"] { border-left-color: #10b981; }
.ai-insight-card[data-type="warning"] { border-left-color: #f59e0b; }
.ai-insight-card[data-type="tip"] { border-left-color: #06b6d4; }
.ai-insight-icon { font-size: 24px; flex-shrink: 0; }
.ai-insight-body { flex: 1; min-width: 0; }
.ai-insight-title { font-weight: 600; font-size: 14px; margin-bottom: 4px; }
.ai-insight-desc { font-size: 13px; color: var(--text-muted); line-height: 1.5; }

/* ============ GOAL CREATE MODAL ============ */
#goal-create-modal .modal-content { max-width: 420px; }
#goal-create-modal select, #goal-create-modal input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text); font-size: 14px; margin-bottom: 12px;
}

/* ============ TELEGRAM & WIDGET SETTINGS ============ */
.telegram-link-section, .widget-embed-section {
  background: var(--card-bg); border-radius: 14px; padding: 16px; margin-top: 14px;
  border: 1px solid var(--border);
}
.telegram-link-section h4, .widget-embed-section h4 {
  font-size: 14px; font-weight: 600; margin-bottom: 10px;
}
.telegram-link-section input {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 14px; margin-bottom: 10px;
}
.widget-preview { margin-bottom: 12px; text-align: center; }
.widget-codes textarea {
  width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-size: 12px; font-family: monospace;
  resize: none; margin-bottom: 8px;
}

/* ==================== ADMIN ANALYTICS ==================== */
.aa-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; margin-bottom: 24px;
}
.aa-kpi {
  background: #fff; border-radius: 14px; padding: 16px; text-align: center;
  border: 1px solid var(--border); transition: border-color .2s;
}
.aa-kpi:hover { border-color: var(--primary); }
.aa-kpi-icon { font-size: 22px; margin-bottom: 4px; }
.aa-kpi-val { font-size: 24px; font-weight: 700; color: var(--text); }
.aa-kpi-label { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.aa-charts-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; margin-bottom: 20px; }
.aa-chart-card {
  background: #fff; border-radius: 14px; padding: 18px; border: 1px solid var(--border);
}
.aa-chart-card h4 { font-size: 14px; font-weight: 600; margin-bottom: 12px; }

/* ==================== CONTENT CALENDAR ==================== */
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.cal-header {
  text-align: center; font-size: 11px; font-weight: 600; color: var(--text-muted);
  padding: 8px 0; text-transform: uppercase;
}
.cal-day {
  min-height: 80px; background: var(--card-bg); border-radius: 8px; padding: 6px;
  border: 1px solid var(--border); cursor: pointer; transition: border-color .2s;
  overflow: hidden;
}
.cal-day:hover { border-color: var(--primary); }
.cal-empty { background: transparent; border-color: transparent; cursor: default; }
.cal-empty:hover { border-color: transparent; }
.cal-today { border-color: var(--primary); background: rgba(13,148,136,.06); }
.cal-day-num { font-size: 12px; font-weight: 600; margin-bottom: 4px; color: var(--text); }
.cal-entry {
  font-size: 10px; padding: 2px 4px; margin-bottom: 2px; border-radius: 4px;
  background: rgba(13,148,136,.08); cursor: pointer; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.cal-entry:hover { background: rgba(13,148,136,.16); }
.cal-entry-title { color: var(--text); }

/* ==================== CAMPAIGN REVIEWS ==================== */
.review-pending-card {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--card-bg); border-radius: 12px; padding: 12px 16px;
  border: 1px solid var(--border); margin-bottom: 8px;
}
.review-card {
  background: var(--card-bg); border-radius: 12px; padding: 14px 16px;
  border: 1px solid var(--border); margin-bottom: 8px;
}
.review-card-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.review-stars-display { color: #F59E0B; font-size: 16px; letter-spacing: 2px; }
.review-card-comment { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin: 0; }
.review-stats-badge {
  display: inline-block; background: rgba(245,158,11,.1); color: #F59E0B;
  border-radius: 10px; padding: 6px 14px; font-size: 13px; font-weight: 600;
}
#review-stars { display: flex; gap: 4px; }
.review-star {
  font-size: 28px; cursor: pointer; color: #4b5563; transition: color .15s; user-select: none;
}
.review-star.active, .review-star:hover { color: #F59E0B; }

/* ───────── CHATBOT AI ───────── */

/* FAB button */
.chatbot-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--fluenk-accent, #06B6D4));
  color: #fff; cursor: pointer;
  box-shadow: 0 4px 20px rgba(13,148,136,.35), 0 0 0 0 rgba(13,148,136,.4);
  display: flex; align-items: center; justify-content: center;
  transition: transform .25s cubic-bezier(.25,.46,.45,.94), box-shadow .3s;
  animation: chatFabPulse 3s ease-in-out infinite;
}
.chatbot-fab:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(13,148,136,.45);
  animation: none;
}
@keyframes chatFabPulse {
  0%, 100% { box-shadow: 0 4px 20px rgba(13,148,136,.35), 0 0 0 0 rgba(13,148,136,.3); }
  50% { box-shadow: 0 4px 20px rgba(13,148,136,.35), 0 0 0 10px rgba(13,148,136,0); }
}
.chatbot-fab svg { width: 26px; height: 26px; transition: transform .3s, opacity .3s; }
.chatbot-fab .chatbot-fab-close { display: none; }
.chatbot-fab--open { animation: none; }
.chatbot-fab--open .chatbot-fab-open { display: none; }
.chatbot-fab--open .chatbot-fab-close { display: block; }

/* Panel */
.chatbot-panel {
  position: fixed; bottom: 96px; right: 24px; z-index: 9998;
  width: 400px; max-height: 560px; border-radius: 20px;
  background: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-light, #E5E5EA);
  box-shadow: 0 20px 60px rgba(0,0,0,.12), 0 4px 16px rgba(0,0,0,.06);
  display: none; flex-direction: column;
  overflow: hidden;
  transform-origin: bottom right;
}
.chatbot-panel[data-animate] {
  animation: chatPanelIn .3s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes chatPanelIn {
  0% { opacity: 0; transform: scale(.85) translateY(16px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

/* Header — gradient brand */
.chatbot-header {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--fluenk-accent, #06B6D4));
  color: #fff; position: relative;
}
.chatbot-header-avatar {
  width: 40px; height: 40px; border-radius: 14px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.chatbot-header-info { flex: 1; }
.chatbot-header-info h4 {
  margin: 0; font-size: 15px; font-weight: 700; color: #fff;
  font-family: var(--font-display);
}
.chatbot-header-info span {
  font-size: 11px; color: rgba(255,255,255,.75);
  display: inline-flex; align-items: center; gap: 5px;
}
.chatbot-status-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4ADE80;
  box-shadow: 0 0 6px rgba(74,222,128,.6);
  display: inline-block;
}
.chatbot-close-btn {
  background: rgba(255,255,255,.15); border: none; color: #fff; cursor: pointer;
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; line-height: 1;
  transition: background .15s;
  flex-shrink: 0; margin-left: auto;
}
.chatbot-close-btn:hover { background: rgba(255,255,255,.28); }

/* Messages area */
.chatbot-messages {
  flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px;
  min-height: 0;
  background: var(--bg, #F2F2F7);
  scroll-behavior: smooth;
}
.chatbot-messages::-webkit-scrollbar { width: 4px; }
.chatbot-messages::-webkit-scrollbar-thumb {
  background: var(--border, #D1D1D6); border-radius: 4px;
}
.chatbot-messages::-webkit-scrollbar-track { background: transparent; }

/* Message bubbles */
.chatbot-msg {
  display: flex; gap: 8px; max-width: 88%;
  animation: chatMsgIn .3s ease-out forwards;
  opacity: 0;
}
@keyframes chatMsgIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.chatbot-msg--bot { align-self: flex-start; }
.chatbot-msg--user { align-self: flex-end; flex-direction: row-reverse; }

.chatbot-avatar {
  width: 30px; height: 30px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--fluenk-accent, #06B6D4));
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(13,148,136,.2);
}

.chatbot-bubble {
  padding: 12px 16px; border-radius: 16px; font-size: 13.5px; line-height: 1.6;
  color: var(--text, #1C1C1E);
  word-break: break-word;
}
.chatbot-msg--bot .chatbot-bubble {
  background: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-light, #E5E5EA);
  border-bottom-left-radius: 6px;
  color: var(--text, #1C1C1E);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.chatbot-msg--user .chatbot-bubble {
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--primary-hover, #0F766E));
  color: #fff; border-bottom-right-radius: 6px;
  box-shadow: 0 2px 8px rgba(13,148,136,.2);
}

/* Quick suggestions — card style chips */
.chatbot-suggestions {
  display: flex; gap: 8px; padding: 10px 18px; overflow-x: auto;
  background: var(--bg-card, #FFFFFF);
  border-top: 1px solid var(--border-light, #E5E5EA);
  flex-shrink: 0;
}
.chatbot-suggestions::-webkit-scrollbar { height: 0; }
.chatbot-sugg-btn {
  flex-shrink: 0; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border-light, #E5E5EA);
  background: var(--bg-card, #FFFFFF);
  color: var(--text, #1C1C1E);
  font-size: 12px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: all .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.chatbot-sugg-btn:hover {
  background: var(--primary, #0D9488); border-color: var(--primary, #0D9488);
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(13,148,136,.2);
}

/* Input bar */
.chatbot-input-bar {
  display: flex; gap: 10px; padding: 14px 18px;
  border-top: 1px solid var(--border-light, #E5E5EA);
  background: var(--bg-card, #FFFFFF);
}
.chatbot-input-bar input {
  flex: 1; border: 1.5px solid var(--border, #D1D1D6); border-radius: 12px;
  padding: 10px 16px; font-size: 13.5px; background: var(--bg, #F2F2F7);
  color: var(--text, #1C1C1E); outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.chatbot-input-bar input:focus {
  border-color: var(--primary, #0D9488);
  box-shadow: 0 0 0 3px rgba(13,148,136,.12);
}
.chatbot-input-bar input::placeholder { color: var(--text-muted, #8E8E93); }
.chatbot-send-btn {
  width: 40px; height: 40px; border-radius: 12px; border: none;
  background: linear-gradient(135deg, var(--primary, #0D9488), var(--fluenk-accent, #06B6D4));
  color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(13,148,136,.25);
}
.chatbot-send-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 4px 14px rgba(13,148,136,.35);
}
.chatbot-send-btn:active { transform: scale(.96); }
.chatbot-send-btn svg { width: 18px; height: 18px; }

/* Action buttons inside bot messages */
.chatbot-actions {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 10px;
  border-top: 1px solid var(--border-light, #E5E5EA);
}
.chatbot-action-btn {
  padding: 7px 14px; border-radius: 8px;
  border: 1.5px solid var(--primary, #0D9488);
  background: rgba(13,148,136,0.06);
  color: var(--primary, #0D9488);
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
  transition: all .2s;
}
.chatbot-action-btn:hover {
  background: var(--primary, #0D9488); color: #fff;
  box-shadow: 0 2px 8px rgba(13,148,136,.25);
  transform: translateY(-1px);
}

/* Chat bubble rich content */
.chatbot-bubble ul, .chatbot-bubble ol {
  margin: 8px 0; padding-left: 18px;
}
.chatbot-bubble li {
  margin-bottom: 4px; font-size: 13px; line-height: 1.55;
}
.chatbot-bubble strong {
  color: var(--primary-dark, #115E59);
}
/* Section headers inside bot bubbles */
.chatbot-header {
  display: block; margin: 12px 0 6px; font-size: 14px; font-weight: 700;
  color: var(--primary-dark, #115E59);
  padding-bottom: 5px;
  border-bottom: 1.5px solid var(--border-light, #E5E5EA);
}
.chatbot-header:first-child { margin-top: 0; }
/* Platform sub-headers */
.chatbot-subheader {
  display: block; margin: 10px 0 3px; font-size: 13px; font-weight: 700;
  color: var(--primary, #0D9488);
}

/* Loading dots */
.chatbot-dots { display: flex; gap: 5px; align-items: center; padding: 6px 0; }
.chatbot-dots span {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--primary, #0D9488);
  animation: chatDot 1.4s infinite ease-in-out;
}
.chatbot-dots span:nth-child(2) { animation-delay: .2s; }
.chatbot-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes chatDot {
  0%, 80%, 100% { opacity: .25; transform: scale(.7); }
  40% { opacity: 1; transform: scale(1.1); }
}

/* Typing label */
.chatbot-typing-label {
  font-size: 11px; color: var(--text-muted); margin-left: 38px;
  margin-top: -6px; animation: chatMsgIn .3s ease-out forwards; opacity: 0;
}

/* Powered by badge */
.chatbot-footer-badge {
  text-align: center; padding: 6px; font-size: 10px; color: var(--text-muted);
  background: var(--bg-card, #FFFFFF);
  border-top: 1px solid var(--border-light, #E5E5EA);
  letter-spacing: .3px;
}
.chatbot-footer-badge span { font-weight: 700; color: var(--primary, #0D9488); }

@media (max-width: 480px) {
  .chatbot-panel {
    width: calc(100vw - 16px); right: 8px; bottom: 84px;
    max-height: 75vh; border-radius: 16px;
  }
  .chatbot-fab { bottom: 16px; right: 16px; width: 52px; height: 52px; }
}

/* ============ F1: PUBLIC MARKETPLACE ============ */
.pub-mkt-hero { text-align: center; padding: 48px 20px 32px; }
.pub-mkt-title { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.pub-mkt-sub { color: var(--text-muted); font-size: 1rem; }
.pub-mkt-stats-row { display: flex; gap: 24px; justify-content: center; margin-top: 20px; }
.pub-mkt-stat { text-align: center; }
.pub-mkt-stat-val { display: block; font-size: 1.4rem; font-weight: 700; color: var(--primary); }
.pub-mkt-stat-lbl { font-size: .75rem; color: var(--text-muted); }
.pub-mkt-section { max-width: 1100px; margin: 0 auto 32px; padding: 0 16px; }
.pub-mkt-section-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.pub-mkt-creators-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.pub-mkt-creator-card { background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.pub-mkt-creator-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.pub-mkt-creator-avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; margin: 0 auto 8px; background: var(--bg-muted, #f3f4f6); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.pub-mkt-creator-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pub-mkt-creator-name { font-weight: 600; font-size: .9rem; margin-bottom: 2px; }
.pub-mkt-creator-score { font-size: .75rem; color: var(--primary); font-weight: 600; }
.pub-mkt-creator-followers { font-size: .7rem; color: var(--text-muted); }
.pub-mkt-campaigns-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.pub-mkt-campaign-card { background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 16px; }
.pub-mkt-campaign-card h4 { font-size: .95rem; margin-bottom: 6px; }
.pub-mkt-filters { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============ F2: PUBLIC MEDIA KIT — COMPLETE REDESIGN ============ */
.media-kit-public {
  max-width: 820px; margin: 0 auto; padding: 24px 16px 48px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---- Back bar ---- */
.mk-back-bar { padding: 4px 0 16px; }
.mk-back-btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 10px; color: var(--text-muted); font-size: 13px; font-weight: 500;
  text-decoration: none; cursor: pointer; transition: all .25s ease;
}
.mk-back-btn:hover {
  background: var(--primary); color: #fff; border-color: var(--primary);
  transform: translateX(-3px);
}
.mk-back-btn svg { flex-shrink: 0; }

/* ---- Back bar context for profile/compare/user pages ---- */
#page-profile .mk-back-bar,
#page-user-profile .mk-back-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4px 24px 16px;
}
#page-compare .mk-back-bar {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 4px 20px 16px;
}

/* ---- Hero Section ---- */
.mk-hero {
  position: relative; border-radius: 20px; overflow: hidden;
  background: linear-gradient(135deg, rgba(13,148,136,.15) 0%, rgba(6,182,212,.08) 50%, transparent 100%);
  border: 1px solid var(--border-color); padding: 32px;
  margin-bottom: 28px; isolation: isolate;
}
.mk-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(13,148,136,.12) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
}
.mk-hero-inner { position: relative; z-index: 1; display: flex; align-items: center; gap: 28px; }
.mk-hero-avatar {
  width: 100px; height: 100px; border-radius: 50%; overflow: hidden;
  flex-shrink: 0; position: relative;
  border: 3px solid var(--primary); box-shadow: 0 0 0 4px rgba(13,148,136,.15), 0 8px 32px rgba(13,148,136,.2);
}
.mk-hero-avatar img { width: 100%; height: 100%; object-fit: cover; }
.mk-hero-avatar-placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary), rgba(6,182,212,.6)); font-size: 40px;
}
.mk-hero-info { flex: 1; min-width: 0; }
.mk-hero-name {
  font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin-bottom: 2px;
  background: linear-gradient(135deg, var(--text-primary), var(--primary));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mk-hero-handle { font-size: .9rem; color: var(--text-muted); font-weight: 500; }
.mk-hero-tagline {
  margin-top: 6px; font-style: italic; font-size: .95rem;
  color: var(--text-secondary); padding-left: 12px;
  border-left: 3px solid var(--primary);
}
.mk-hero-bio {
  margin-top: 8px; font-size: .85rem; color: var(--text-secondary);
  line-height: 1.6; max-width: 520px;
}
.mk-hero-location {
  margin-top: 6px; font-size: .82rem; color: var(--text-muted);
  display: inline-flex; align-items: center; gap: 4px;
}

/* ---- Hero Meta Badges ---- */
.mk-hero-badges {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px;
}
.mk-hero-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 12px; border-radius: 20px; font-size: .75rem; font-weight: 600;
  background: var(--bg-muted); color: var(--text-secondary); border: 1px solid var(--border-color);
}
.mk-hero-badge--score {
  background: rgba(13,148,136,.12); color: var(--primary); border-color: rgba(13,148,136,.2);
}
.mk-hero-badge--growth {
  background: rgba(34,197,94,.12); color: #22c55e; border-color: rgba(34,197,94,.2);
}
.mk-hero-badge--decline {
  background: rgba(239,68,68,.12); color: #ef4444; border-color: rgba(239,68,68,.2);
}
.mk-hero-badge--safety {
  background: rgba(251,191,36,.12); color: #f59e0b; border-color: rgba(251,191,36,.2);
}

/* ---- Quick Stats Grid ---- */
.mk-quick-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px; margin-bottom: 28px;
}
.mk-qstat {
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 14px; padding: 16px; text-align: center;
  transition: all .3s ease; position: relative; overflow: hidden;
}
.mk-qstat:hover {
  transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.06);
  border-color: rgba(13,148,136,.2);
}
.mk-qstat::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(6,182,212,.5));
  opacity: 0; transition: opacity .3s;
}
.mk-qstat:hover::after { opacity: 1; }
.mk-qstat-icon { font-size: 1.3rem; margin-bottom: 4px; }
.mk-qstat-val {
  display: block; font-size: 1.3rem; font-weight: 800; color: var(--text-primary);
  line-height: 1.2;
}
.mk-qstat-lbl { font-size: .7rem; color: var(--text-muted); font-weight: 500; }
.mk-qstat-sub {
  font-size: .65rem; color: var(--text-muted); margin-top: 2px;
  display: flex; align-items: center; justify-content: center; gap: 3px;
}
.mk-qstat-sub--up { color: #22c55e; }
.mk-qstat-sub--down { color: #ef4444; }

/* ---- Section ---- */
.mk-section {
  background: var(--card-bg); border: 1px solid var(--border-color);
  border-radius: 16px; padding: 24px; margin-bottom: 20px;
  transition: box-shadow .2s;
}
.mk-section:hover { box-shadow: 0 2px 12px rgba(0,0,0,.03); }
.mk-section-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
}
.mk-section-icon {
  width: 32px; height: 32px; border-radius: 10px;
  background: linear-gradient(135deg, rgba(13,148,136,.12), rgba(6,182,212,.08));
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  flex-shrink: 0;
}
.mk-section-title {
  font-size: 1.05rem; font-weight: 700; color: var(--text-primary); margin: 0;
}

/* ---- Platform Cards ---- */
.mk-platforms-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px;
}
.mk-platform-card {
  background: var(--bg-muted, #f9fafb); border: 1px solid var(--border-color);
  border-radius: 14px; padding: 18px; transition: all .3s ease;
  position: relative; overflow: hidden;
}
.mk-platform-card:hover {
  transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.07);
  border-color: rgba(13,148,136,.2);
}
.mk-platform-top {
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.mk-platform-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), rgba(6,182,212,.6));
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
  flex-shrink: 0;
}
.mk-platform-info { flex: 1; min-width: 0; }
.mk-platform-name { font-size: .85rem; font-weight: 700; color: var(--text-primary); }
.mk-platform-handle { font-size: .7rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mk-platform-followers {
  font-size: 1.2rem; font-weight: 800; color: var(--primary); line-height: 1.1;
}
.mk-platform-followers-label { font-size: .65rem; color: var(--text-muted); font-weight: 500; }
.mk-platform-metrics {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--border-color);
}
.mk-platform-metric { text-align: center; }
.mk-platform-metric-val { display: block; font-size: .8rem; font-weight: 700; color: var(--text-primary); }
.mk-platform-metric-lbl { font-size: .6rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }
.mk-platform-bottom {
  display: flex; justify-content: space-between; align-items: center; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--border-color);
}
.mk-platform-er {
  font-size: .78rem; font-weight: 600; color: var(--text-secondary);
}
.mk-platform-er strong { color: var(--primary); }
.mk-platform-posts { font-size: .72rem; color: var(--text-muted); }

/* ---- Highlights ---- */
.mk-highlights-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px;
}
.mk-highlight-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: var(--bg-muted);
  border-radius: 10px; border: 1px solid var(--border-color);
  font-size: .85rem; color: var(--text-secondary); line-height: 1.4;
}
.mk-highlight-check {
  width: 20px; height: 20px; border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; color: #fff; font-size: .7rem; font-weight: 700;
}

/* ---- Rates ---- */
.mk-rates-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px;
}
.mk-rate-item {
  background: var(--bg-muted); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 16px 12px; text-align: center;
  transition: all .3s ease; position: relative; overflow: hidden;
}
.mk-rate-item:hover {
  transform: translateY(-2px); border-color: rgba(13,148,136,.3);
  box-shadow: 0 4px 16px rgba(13,148,136,.1);
}
.mk-rate-item::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--primary), rgba(6,182,212,.4));
}
.mk-rate-label {
  display: block; font-size: .78rem; color: var(--text-muted); margin-bottom: 4px;
  font-weight: 500; text-transform: capitalize;
}
.mk-rate-value {
  font-size: 1.2rem; font-weight: 800; color: var(--primary);
}
.mk-rate-value::before { content: '€'; font-size: .85rem; }

/* ---- Demographics ---- */
.mk-demo-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px;
}
.mk-demo-group h4 {
  font-size: .78rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
  letter-spacing: .06em; margin-bottom: 12px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border-color);
}
.mk-demo-bars { display: flex; flex-direction: column; gap: 8px; }
.mk-demo-bar {
  display: flex; align-items: center; gap: 10px;
}
.mk-demo-bar-label { font-size: .78rem; color: var(--text-secondary); min-width: 64px; text-align: right; }
.mk-demo-bar-bg {
  flex: 1; height: 10px; background: var(--bg-muted);
  border-radius: 6px; overflow: hidden;
}
.mk-demo-bar-fill {
  height: 100%; border-radius: 6px;
  background: linear-gradient(90deg, var(--primary), rgba(6,182,212,.6));
  transition: width .6s ease; position: relative;
}
.mk-demo-bar-val {
  font-size: .75rem; font-weight: 700; color: var(--text-primary);
  min-width: 40px; text-align: right;
}

/* ---- Portfolio ---- */
.mk-portfolio-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px;
}
.mk-portfolio-item {
  background: var(--bg-muted); border: 1px solid var(--border-color);
  border-radius: 14px; padding: 18px; transition: all .3s ease;
}
.mk-portfolio-item:hover {
  transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.07);
  border-color: rgba(13,148,136,.2);
}
.mk-portfolio-item h4 {
  font-size: .9rem; font-weight: 700; margin-bottom: 6px; color: var(--text-primary);
}
.mk-portfolio-item p {
  font-size: .8rem; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.mk-portfolio-metrics {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  font-size: .7rem; font-weight: 700;
  background: linear-gradient(135deg, rgba(13,148,136,.12), rgba(6,182,212,.08));
  color: var(--primary); padding: 3px 10px; border-radius: 6px;
}
.mk-portfolio-link {
  display: inline-flex; align-items: center; gap: 4px; margin-top: 8px;
  font-size: .78rem; color: var(--primary); font-weight: 600;
  text-decoration: none; transition: gap .2s;
}
.mk-portfolio-link:hover { gap: 8px; text-decoration: underline; }

/* ---- Reviews ---- */
.mk-reviews-summary {
  display: flex; align-items: center; gap: 10px; margin-bottom: 16px;
  padding: 14px 18px; background: var(--bg-muted);
  border-radius: 12px; border: 1px solid var(--border-color);
}
.mk-reviews-stars { color: #f59e0b; font-size: 1.2rem; letter-spacing: 2px; }
.mk-reviews-avg { font-size: 1.1rem; font-weight: 800; color: var(--text-primary); }
.mk-reviews-count { font-size: .8rem; color: var(--text-muted); }
.mk-reviews-list { display: flex; flex-direction: column; gap: 10px; }
.mk-review-card {
  background: var(--bg-muted); border: 1px solid var(--border-color);
  border-radius: 12px; padding: 14px 16px; transition: box-shadow .2s;
}
.mk-review-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.mk-review-header {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.mk-review-author {
  font-size: .85rem; font-weight: 700; color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}
.mk-review-author-icon {
  width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), rgba(6,182,212,.5));
  display: flex; align-items: center; justify-content: center;
  font-size: .65rem; color: #fff; font-weight: 700;
}
.mk-review-rating { color: #f59e0b; font-size: .85rem; letter-spacing: 1px; }
.mk-review-text {
  font-size: .82rem; color: var(--text-secondary); line-height: 1.5;
}

/* ---- Growth Analytics ---- */
.mk-growth-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px;
}
.mk-growth-item {
  text-align: center; padding: 12px; background: var(--bg-muted);
  border-radius: 10px; border: 1px solid var(--border-color);
}
.mk-growth-period { display: block; font-size: .7rem; color: var(--text-muted); font-weight: 500; }
.mk-growth-val {
  display: block; font-size: 1.1rem; font-weight: 800; margin-top: 2px;
}
.mk-growth-val--pos { color: #22c55e; }
.mk-growth-val--neg { color: #ef4444; }
.mk-growth-val--neu { color: var(--text-muted); }

/* ---- Categories / Tags ---- */
.mk-categories { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-cat-tag {
  padding: 5px 14px; border-radius: 20px; font-size: .78rem; font-weight: 600;
  background: linear-gradient(135deg, rgba(13,148,136,.12), rgba(6,182,212,.08));
  color: var(--primary); border: 1px solid rgba(13,148,136,.15);
  transition: all .2s;
}
.mk-cat-tag:hover {
  background: var(--primary); color: #fff;
  transform: translateY(-1px);
}

/* ---- Content Performance ---- */
.mk-perf-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px;
}
.mk-perf-item {
  text-align: center; padding: 14px 10px; background: var(--bg-muted);
  border-radius: 10px; border: 1px solid var(--border-color);
}
.mk-perf-icon { font-size: 1.2rem; margin-bottom: 2px; }
.mk-perf-val { display: block; font-size: 1rem; font-weight: 800; color: var(--text-primary); }
.mk-perf-lbl { font-size: .65rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .03em; }

/* ---- Footer ---- */
.mk-footer {
  text-align: center; padding: 24px 0 8px;
  border-top: 1px solid var(--border-color); margin-top: 16px;
}
.mk-footer p { font-size: .75rem; color: var(--text-muted); }
.mk-footer strong { color: var(--primary); }

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .media-kit-public { padding: 16px 12px 32px; }
  .mk-hero { padding: 20px; }
  .mk-hero-inner { flex-direction: column; text-align: center; }
  .mk-hero-bio { max-width: 100%; }
  .mk-hero-tagline { border-left: none; padding-left: 0; text-align: center; }
  .mk-hero-badges { justify-content: center; }
  .mk-hero-name { font-size: 1.3rem; }
  .mk-quick-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .mk-platforms-grid { grid-template-columns: 1fr; }
  .mk-demo-grid { grid-template-columns: 1fr; }
  .mk-rates-grid { grid-template-columns: repeat(2, 1fr); }
  .mk-portfolio-grid { grid-template-columns: 1fr; }
  .mk-section { padding: 16px; }
  .mk-highlights-grid { grid-template-columns: 1fr; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .mk-platforms-grid { grid-template-columns: repeat(2, 1fr); }
  .mk-quick-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ============ F4: BRAND ADVANCED ANALYTICS ============ */
.adv-analytics-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.adv-analytics-card { background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 16px; }
.adv-analytics-card h4 { font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
.adv-analytics-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; text-align: center; }
.adv-val { display: block; font-size: 1rem; font-weight: 700; }
.adv-val--green { color: #22c55e; }
.adv-val--red { color: #ef4444; }
.adv-lbl { font-size: .65rem; color: var(--text-muted); }
.adv-creators-list { display: flex; flex-direction: column; gap: 8px; }
.adv-creator-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 10px; }
.adv-creator-rank { font-weight: 700; color: var(--primary); min-width: 28px; }
.adv-creator-name { flex: 1; font-weight: 600; font-size: .9rem; }
.adv-creator-metric { font-size: .8rem; color: var(--text-muted); min-width: 80px; text-align: right; }

/* ============ F5: CAMPAIGN TEMPLATES ============ */
.tpl-card { background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 16px; margin-bottom: 12px; }
.tpl-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.tpl-card-header h4 { font-size: .95rem; font-weight: 600; }
.tpl-card-actions { display: flex; gap: 6px; }
.tpl-card-desc { font-size: .85rem; color: var(--text-muted); margin-bottom: 8px; }
.tpl-card-meta { display: flex; gap: 12px; font-size: .75rem; color: var(--text-muted); flex-wrap: wrap; }
.bd-btn-sm { padding: 4px 10px; font-size: .75rem; border: none; border-radius: 6px; cursor: pointer; font-weight: 600; }
.bd-btn-success { background: #22c55e; color: #fff; }
.bd-btn-success:hover { background: #16a34a; }
.bd-btn-danger { background: #ef4444; color: #fff; }
.bd-btn-danger:hover { background: #dc2626; }

/* ============ F6: SUPPORT TICKETS ============ */
.tickets-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.tickets-header h2 { font-size: 1.3rem; font-weight: 700; }
.tickets-grid { display: flex; flex-direction: column; gap: 10px; }
.ticket-card { background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 14px 16px; cursor: pointer; transition: box-shadow .15s; }
.ticket-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.ticket-card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.ticket-card-subject { font-weight: 600; font-size: .9rem; }
.ticket-card-status { font-size: .7rem; padding: 2px 8px; border-radius: 10px; color: #fff; font-weight: 600; }
.ticket-card-meta { display: flex; gap: 12px; font-size: .75rem; color: var(--text-muted); }
.ticket-chat-area { margin-top: 20px; border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; overflow: hidden; }
.ticket-chat-header { padding: 12px 16px; background: var(--bg-muted, #f9fafb); border-bottom: 1px solid var(--border-color, #e5e7eb); }
.ticket-chat-messages { max-height: 360px; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.ticket-msg { display: flex; }
.ticket-msg--user { justify-content: flex-end; }
.ticket-msg--admin { justify-content: flex-start; }
.ticket-msg-bubble { max-width: 75%; padding: 10px 14px; border-radius: 12px; font-size: .85rem; }
.ticket-msg--user .ticket-msg-bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.ticket-msg--admin .ticket-msg-bubble { background: var(--bg-muted, #f3f4f6); border-bottom-left-radius: 4px; }
.ticket-msg-sender { display: block; font-size: .7rem; font-weight: 600; margin-bottom: 2px; opacity: .8; }
.ticket-msg-time { display: block; font-size: .65rem; margin-top: 4px; opacity: .6; }
.ticket-chat-input-row { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border-color, #e5e7eb); background: var(--bg-muted, #f9fafb); }
.ticket-chat-input-row .bd-input { flex: 1; }

/* ============ F8: A/B BIO VARIANTS ============ */
.bio-variant-card { background: var(--card-bg, #fff); border: 1px solid var(--border-color, #e5e7eb); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.bio-variant-active { border-color: var(--primary); background: rgba(13,148,136,.04); }
.bio-variant-text { font-size: .9rem; line-height: 1.5; margin-bottom: 8px; }
.bio-variant-metrics { display: flex; gap: 14px; font-size: .75rem; color: var(--text-muted); margin-bottom: 8px; }
.bio-variant-actions { display: flex; align-items: center; gap: 8px; }
.bio-variant-badge { font-size: .75rem; color: var(--primary); font-weight: 600; }

@media (max-width: 600px) {
  .pub-mkt-creators-grid { grid-template-columns: repeat(2, 1fr); }
  .adv-analytics-grid { grid-template-columns: 1fr; }
  .ticket-msg-bubble { max-width: 90%; }
}

/* ==================== QR CODE MODAL ==================== */
.qr-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.7); z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .2s;
}
.qr-modal-content {
  background: var(--card-bg, #1a1a2e); border-radius: 16px; padding: 32px;
  text-align: center; max-width: 360px; width: 90%; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.qr-modal-close {
  position: absolute; top: 10px; right: 14px; background: none; border: none;
  color: var(--text-muted); font-size: 22px; cursor: pointer; line-height: 1;
}
.qr-modal-close:hover { color: #fff; }
.qr-modal-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 4px; color: var(--text-primary, #e7e9ea); }
.qr-modal-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 16px; }
.qr-modal-img { width: 200px; height: 200px; border-radius: 12px; background: #fff; padding: 8px; margin: 0 auto 12px; display: block; }
.qr-modal-url { font-size: .7rem; color: var(--text-muted); word-break: break-all; margin-bottom: 16px; }
.qr-modal-actions { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }

/* ==================== NOTIFICATION PREFERENCES ==================== */
.notif-pref-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.06);
  cursor: pointer; gap: 12px;
}
.notif-pref-row:last-of-type { border-bottom: none; }
.notif-pref-label { font-size: .88rem; color: var(--text-primary); flex: 1; }
.notif-pref-check { display: none; }
.notif-pref-slider {
  width: 40px; height: 22px; background: rgba(255,255,255,.12); border-radius: 12px;
  position: relative; transition: background .2s; flex-shrink: 0;
}
.notif-pref-slider::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  background: #fff; border-radius: 50%; transition: transform .2s;
}
.notif-pref-check:checked + .notif-pref-slider { background: var(--primary, #0D9488); }
.notif-pref-check:checked + .notif-pref-slider::after { transform: translateX(18px); }

/* ==================== CSV EXPORT BUTTON ==================== */
.csv-export-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.csv-export-btn {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 14px;
  background: rgba(13,148,136,.12); color: var(--primary, #0D9488); border: 1px solid rgba(13,148,136,.25);
  border-radius: 8px; font-size: .78rem; font-weight: 600; cursor: pointer; transition: all .2s;
}
.csv-export-btn:hover { background: rgba(13,148,136,.22); border-color: var(--primary, #0D9488); }

/* ==================== CAMPAIGN REPORT BUTTON ==================== */
.bd-camp-report-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid rgba(13,148,136,.3);
  background: rgba(13,148,136,.08); color: var(--primary, #0D9488); cursor: pointer; transition: all .2s;
}
.bd-camp-report-btn:hover { background: rgba(13,148,136,.2); }

/* ==================== POST REACTIONS & COMMENTS ==================== */
.post-reactions-bar { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.post-react-btn {
  display: inline-flex; align-items: center; gap: 3px; padding: 4px 8px;
  border-radius: 16px; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.04);
  color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all .2s;
}
.post-react-btn:hover { background: rgba(13,148,136,.12); border-color: rgba(13,148,136,.3); }
.post-react-btn.post-react-active { background: rgba(13,148,136,.15); border-color: rgba(13,148,136,.4); color: var(--primary); }
.post-react-cnt { font-size: 11px; font-weight: 600; }
.post-comments-toggle {
  background: none; border: none; color: var(--text-muted); font-size: 12px; cursor: pointer;
  padding: 6px 0; margin-top: 4px; transition: color .2s;
}
.post-comments-toggle:hover { color: var(--primary); }
.post-comments-section { border-top: 1px solid rgba(255,255,255,.06); margin-top: 8px; padding-top: 8px; }
.post-comment-item { display: flex; gap: 8px; align-items: flex-start; padding: 6px 0; }
.post-comment-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.post-comment-body { flex: 1; min-width: 0; }
.post-comment-user { font-weight: 600; font-size: 12px; color: var(--text-primary); margin-right: 6px; }
.post-comment-text { font-size: 13px; color: var(--text-secondary); word-break: break-word; }
.post-comment-date { font-size: 10px; color: var(--text-muted); margin-left: 8px; }
.post-comment-del { background: none; border: none; cursor: pointer; font-size: 11px; opacity: .5; margin-left: 6px; }
.post-comment-del:hover { opacity: 1; }
.post-comment-form { display: flex; gap: 6px; margin-top: 8px; }
.post-comment-input {
  flex: 1; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04); color: var(--text-primary); font-size: 13px; outline: none;
}
.post-comment-input:focus { border-color: var(--primary); }
.post-comment-send {
  padding: 6px 12px; border-radius: 8px; border: none; background: var(--primary); color: #fff;
  font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap;
}
.post-comment-send:hover { filter: brightness(1.15); }

/* ==================== COLLABORATION BOARD ==================== */
.collab-board-list { display: flex; flex-direction: column; gap: 12px; }
.collab-empty { padding: 32px; text-align: center; color: var(--text-muted); font-size: 14px; }
.collab-card {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: 12px;
  padding: 16px; transition: border-color .2s;
}
.collab-card:hover { border-color: rgba(13,148,136,.3); }
.collab-card.collab-closed { opacity: .6; }
.collab-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.collab-type-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 11px; font-weight: 600;
}
.collab-type-collaboration { background: rgba(13,148,136,.15); color: var(--primary); }
.collab-type-mentorship { background: rgba(168,85,247,.15); color: #A855F7; }
.collab-type-networking { background: rgba(59,130,246,.15); color: #3B82F6; }
.collab-category { font-size: 11px; color: var(--text-muted); background: rgba(255,255,255,.06); padding: 2px 8px; border-radius: 8px; }
.collab-status-closed { font-size: 11px; color: #F87171; }
.collab-title { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0 0 6px; }
.collab-desc { font-size: 13px; color: var(--text-secondary); margin: 0 0 10px; line-height: 1.5; }
.collab-meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); margin-bottom: 10px; }
.collab-author:hover { color: var(--primary); }
.collab-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.collab-respond-btn { background: rgba(13,148,136,.12) !important; color: var(--primary) !important; }

/* Collab Responses */
.collab-response-item {
  background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06); border-radius: 8px;
  padding: 12px; margin-bottom: 8px;
}
.collab-response-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.collab-response-user { font-weight: 600; font-size: 13px; color: var(--text-primary); }
.collab-response-user:hover { color: var(--primary); }
.collab-response-date { font-size: 11px; color: var(--text-muted); }
.collab-response-status { font-size: 11px; font-weight: 600; margin-left: auto; }
.collab-rs-pending { color: #FBBF24; }
.collab-rs-accepted { color: #34D399; }
.collab-rs-declined { color: #F87171; }
.collab-response-msg { font-size: 13px; color: var(--text-secondary); margin: 0; line-height: 1.5; }

/* ==================== RANKING LIVE FEED ==================== */

/* ─ Header ─ */
.lf-header {
  padding: 20px 0 16px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-light);
}
.lf-header-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.lf-title-group { display: flex; align-items: center; gap: 10px; }
.lf-live-dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: #ef4444;
  box-shadow: 0 0 0 0 rgba(239,68,68,.5);
  animation: lf-pulse 1.8s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes lf-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.5); }
  70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}
.lf-title {
  font-size: 18px; font-weight: 800; letter-spacing: -.02em;
  color: var(--text-primary);
}
.lf-subtitle {
  font-size: 13px; color: var(--text-muted); margin-bottom: 14px;
}
.lf-refresh-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 20px;
  border: 1px solid var(--border-light);
  background: transparent; color: var(--text-secondary);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .18s;
}
.lf-refresh-btn:hover { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }
.lf-refresh-btn svg { flex-shrink: 0; }

/* ─ Filter pills ─ */
.lf-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.lf-filter-btn {
  padding: 4px 12px; border-radius: 20px;
  border: 1px solid var(--border-light);
  background: transparent; color: var(--text-secondary);
  font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.lf-filter-btn:hover { border-color: var(--primary); color: var(--primary); }
.lf-filter-btn.active { background: var(--primary-bg); color: var(--primary); border-color: var(--primary); }

/* ─ Feed container ─ */
.ranking-livefeed { display: flex; flex-direction: column; gap: 8px; }
.livefeed-empty {
  padding: 48px 24px; text-align: center; color: var(--text-muted); font-size: 14px;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.livefeed-empty-icon { font-size: 32px; opacity: .4; }

/* ─ Single item ─ */
.livefeed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 12px;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  animation: lf-item-in .25s ease both;
  position: relative;
  overflow: hidden;
  cursor: default;
}
.livefeed-item:hover {
  border-color: var(--primary);
  transform: translateX(2px);
  box-shadow: 0 2px 12px rgba(13,148,136,.1);
}
@keyframes lf-item-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.livefeed-item[data-hidden="true"] { display: none; }

/* Left accent bar */
.livefeed-item::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  border-radius: 12px 0 0 12px;
}
.livefeed-rank_up::before          { background: #34d399; }
.livefeed-rank_down::before         { background: #f87171; }
.livefeed-milestone_followers::before { background: #fbbf24; }
.livefeed-new_entry::before         { background: #60a5fa; }
.livefeed-score_change::before      { background: #a78bfa; }

/* Avatar */
.lf-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  object-fit: cover; background: var(--bg-elevated);
  border: 2px solid var(--border-light);
}
.lf-avatar-initials {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--primary), #06b6d4);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; color: #fff;
  border: 2px solid rgba(13,148,136,.3);
}

/* Icon bubble */
.livefeed-icon-bubble {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.livefeed-rank_up     .livefeed-icon-bubble { background: rgba(52,211,153,.12); }
.livefeed-rank_down   .livefeed-icon-bubble { background: rgba(248,113,113,.12); }
.livefeed-milestone_followers .livefeed-icon-bubble { background: rgba(251,191,36,.12); }
.livefeed-new_entry   .livefeed-icon-bubble { background: rgba(96,165,250,.12); }
.livefeed-score_change .livefeed-icon-bubble { background: rgba(167,139,250,.12); }

/* Content */
.livefeed-info { flex: 1; min-width: 0; }
.livefeed-name {
  font-size: 13px; font-weight: 700; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  cursor: pointer;
}
.livefeed-name:hover { color: var(--primary); text-decoration: underline; }
.livefeed-desc {
  display: block; font-size: 12px; color: var(--text-secondary); line-height: 1.4;
  margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.livefeed-time { display: block; font-size: 11px; color: var(--text-muted); margin-top: 3px; }

/* Type badge */
.lf-type-badge {
  flex-shrink: 0; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 20px;
  letter-spacing: .03em; white-space: nowrap;
}
.lf-badge-rank_up   { background: rgba(52,211,153,.15); color: #34d399; }
.lf-badge-rank_down { background: rgba(248,113,113,.15); color: #f87171; }
.lf-badge-milestone_followers { background: rgba(251,191,36,.15); color: #fbbf24; }
.lf-badge-new_entry { background: rgba(96,165,250,.15); color: #60a5fa; }
.lf-badge-score_change { background: rgba(167,139,250,.15); color: #a78bfa; }

/* ==================== ADMIN CLAIMS ==================== */
.admin-claim-item {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 14px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px; margin-bottom: 8px;
}
.admin-claim-info { flex: 1; min-width: 0; }
.admin-claim-info code { background: rgba(13,148,136,.12); color: var(--primary); padding: 1px 5px; border-radius: 4px; font-size: 11px; }
.admin-claim-actions { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.admin-claim-status { font-size: 13px; font-weight: 600; white-space: nowrap; }

/* ============ RANKING QUICK STATS ============ */
.ranking-quick-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  max-width: 400px;
  margin: 0 auto 12px;
  padding: 14px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
}
.rqs-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.rqs-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.rqs-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* ============ RANK NEW BADGE ============ */
.rank-new-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #22C55E, #16A34A);
  border-radius: 20px;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 4px rgba(34, 197, 94, 0.3);
  margin-left: 6px;
  vertical-align: middle;
  line-height: 1;
}

/* ============ RANKING TOOLBAR ============ */
.ranking-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 4px 0;
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ============ THEME TOGGLE ============ */
#btn-theme-toggle {
  transition: transform var(--transition-fast);
}
#btn-theme-toggle:hover {
  transform: rotate(20deg);
}

/* ============ DARK THEME OVERRIDES ============ */
[data-theme="dark"] body {
  color: var(--text);
}
[data-theme="dark"] .header {
  border-bottom-color: var(--border);
}
[data-theme="dark"] .modal-content,
[data-theme="dark"] .filter-dropdown {
  background: var(--bg-elevated);
  border-color: var(--border);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--bg-surface);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
  color: var(--text-muted);
}
[data-theme="dark"] .btn-primary {
  color: #fff;
}
[data-theme="dark"] .btn-secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
[data-theme="dark"] .ranking-card,
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .profile-card {
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="dark"] .nav-btn {
  color: var(--text-secondary);
}
[data-theme="dark"] .nav-btn.active {
  color: var(--primary);
}
[data-theme="dark"] .platform-tab {
  color: var(--text-secondary);
  border-color: transparent;
}
[data-theme="dark"] .platform-tab.active {
  color: var(--primary);
  border-color: var(--primary);
}
[data-theme="dark"] .livefeed-item {
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="dark"] .admin-claim-item {
  background: rgba(255,255,255,.03);
  border-color: var(--border);
}
[data-theme="dark"] .badge,
[data-theme="dark"] .tag {
  background: var(--bg-elevated);
  color: var(--text-secondary);
}
[data-theme="dark"] .tab-btn {
  color: var(--text-secondary);
}
[data-theme="dark"] .tab-btn.active {
  color: var(--primary);
}
[data-theme="dark"] hr {
  border-color: var(--border);
}
[data-theme="dark"] .ranking-filters {
  background: var(--bg-card);
  border-color: var(--border);
}
[data-theme="dark"] .search-box input {
  background: var(--bg-surface);
  border-color: var(--border);
  color: var(--text);
}
[data-theme="dark"] .community-tab-btn {
  color: var(--text-secondary);
}
[data-theme="dark"] .community-tab-btn.active {
  color: var(--primary);
}
[data-theme="dark"] .chat-bubble.sent {
  background: var(--primary);
  color: #fff;
}
[data-theme="dark"] .chat-bubble.received {
  background: var(--bg-elevated);
  color: var(--text);
}
[data-theme="dark"] .notif-dropdown {
  background: var(--bg-elevated);
  border-color: var(--border);
}
[data-theme="dark"] .hamburger-line {
  background: var(--text);
}

@media (max-width: 600px) {
  .ranking-quick-stats {
    gap: 12px;
    padding: 10px 12px;
  }
  .rqs-value {
    font-size: 16px;
  }
  .rqs-label {
    font-size: 10px;
  }
}

/* ============ F7: TRENDING WIDGET ============ */
.trending-widget {
  background: var(--card-bg, #fff);
  border: 1px solid var(--border, rgba(0,0,0,0.08));
  border-radius: 16px;
  padding: 16px 20px;
  margin: 20px auto;
  max-width: 900px;
}
.trending-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}
.trending-title {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text, #111);
  margin: 0;
}
.trending-title svg { stroke: var(--neon-lime, #0D9488); }
.trending-tabs {
  display: flex;
  gap: 4px;
}
.trending-tab {
  background: var(--bg-secondary, #f3f4f6);
  border: 1px solid transparent;
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-secondary, #6B7280);
  transition: all 0.15s;
}
.trending-tab:hover {
  background: var(--bg-tertiary, #e5e7eb);
}
.trending-tab.active {
  background: var(--neon-lime, #0D9488);
  color: #fff;
  border-color: var(--neon-lime, #0D9488);
}
.trending-content { position: relative; }
.trending-pane { display: none; }
.trending-pane.active { display: block; }
.trending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s;
}
.trending-item:hover {
  background: var(--bg-secondary, #f9fafb);
}
.trending-item-pos {
  font-size: 13px;
  font-weight: 800;
  color: var(--text-muted, #9CA3AF);
  min-width: 18px;
  text-align: center;
}
.trending-item-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bg-secondary, #f3f4f6);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.trending-item-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.trending-item-letter {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-secondary, #6B7280);
}
.trending-item-info {
  flex: 1;
  min-width: 0;
}
.trending-item-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text, #111);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.trending-item-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 1px;
}
.trending-item-handle {
  font-size: 11px;
  color: var(--text-muted, #9CA3AF);
}
.trending-plat-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
}
.trending-plat-dot svg { width: 11px; height: 11px; }
.trending-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}
.trending-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  white-space: nowrap;
}
.trending-badge--up {
  background: rgba(34,255,110,0.12);
  color: #16A34A;
}
.trending-badge--score {
  background: rgba(13,148,136,0.12);
  color: #0D9488;
}
.trending-badge--new {
  background: rgba(6,182,212,0.12);
  color: #06B6D4;
}
.trending-item-score {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary, #6B7280);
}
.trending-empty {
  text-align: center;
  color: var(--text-muted, #9CA3AF);
  font-size: 13px;
  padding: 16px 0;
}

/* F6: Media Kit button in profile */
.prf-btn-mediakit {
  background: linear-gradient(135deg, #0D9488, #06B6D4) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 600;
}
.prf-btn-mediakit:hover {
  opacity: 0.9;
}

/* Responsive trending */
@media (max-width: 600px) {
  .trending-widget { padding: 12px 14px; margin: 20px; }
  .trending-header { flex-direction: column; align-items: flex-start; }
  .trending-tabs { width: 100%; overflow-x: auto; }
  .trending-tab { font-size: 11px; padding: 4px 10px; white-space: nowrap; }
  .trending-item { padding: 6px 4px; }
  .trending-item-avatar { width: 30px; height: 30px; }
  .trending-item-name { font-size: 12px; }
}

/* Dark theme overrides */
[data-theme="dark"] .trending-widget {
  background: var(--card-bg, #1f2937);
  border-color: var(--border, rgba(255,255,255,0.08));
}
[data-theme="dark"] .trending-tab {
  background: var(--bg-secondary, #374151);
  color: var(--text-secondary, #9CA3AF);
}
[data-theme="dark"] .trending-item:hover {
  background: var(--bg-secondary, #374151);
}

/* ============ MOBILE BUG FIXES (apr 2026) ============ */

/* === FIX 1: Touch targets min 44px (WCAG 2.1 AA) === */
@media (max-width: 768px) {
  .compare-check {
    width: 36px;
    height: 36px;
    font-size: 14px;
    opacity: 1;
  }
  .fav-btn {
    min-width: 36px;
    min-height: 36px;
    font-size: 22px;
    padding: 6px;
    opacity: 1;
  }
  .notif-mark-read,
  .notif-read-all-btn {
    width: 36px;
    height: 36px;
  }
}

/* === FIX 2: Modal overflow su schermi ≤400px === */
@media (max-width: 480px) {
  .modal {
    max-width: calc(100vw - 24px);
    padding: 24px 16px;
    border-radius: 16px;
  }
  .modal h2 { font-size: 18px; }
}

/* === FIX 3: Ranking grid — 1 colonna su ≤400px === */
@media (max-width: 400px) {
  .ranking-list {
    grid-template-columns: 1fr;
    gap: 8px;
  }
}

/* === FIX 4: Header padding / overflow su ≤360px === */
@media (max-width: 360px) {
  .header-inner {
    padding: 0 8px;
  }
  .ranking-hero {
    padding: 12px 8px 6px;
  }
  .ranking-hero h1 { font-size: 18px; }
  .ranking-container { padding: 0 6px 28px; }

  /* Refresh overlay fit */
  .refresh-overlay-content {
    min-width: 0;
    width: calc(100vw - 24px);
    max-width: none;
    padding: 28px 16px 24px;
  }

  /* Admin tab icons nascoste + padding ridotto */
  .admin-tab svg { width: 0; height: 0; overflow: hidden; margin: 0; padding: 0; }
  .admin-tab { padding: 8px 8px; font-size: 11px; gap: 2px; }

  /* Font leggibili su schermi piccoli */
  .rank-card-name { font-size: 12px; }
  .rank-card-handle { font-size: 10px; }
  .platform-pill { font-size: 8.5px; padding: 2px 6px; }
  .admin-platform-stats { font-size: 12px; }

  /* KPI admin fit */
  .admin-kpi-row { grid-template-columns: 1fr 1fr; gap: 6px; }
  .admin-kpi-value { font-size: 18px; }
  .admin-kpi-label { font-size: 10px; }
}

/* === FIX 5: Profilo hero padding su mobile === */
@media (max-width: 480px) {
  .profile-hero,
  .prf-hero {
    padding: 16px 12px;
  }
  .profile-info { padding: 0 8px; }
}

/* === FIX 6: Prevent horizontal scroll (catch-all) === */
@media (max-width: 768px) {
  html, body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .main, .page {
    overflow-x: hidden;
    max-width: 100vw;
  }
  /* Tabelle scrollabili orizzontalmente dentro il loro container */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
}

/* === FIX 7: Notif dropdown piena larghezza ≤360px === */
@media (max-width: 360px) {
  .notif-dropdown {
    left: 2px;
    right: 2px;
    border-radius: 8px;
  }
  .notif-item { padding: 8px 8px; gap: 6px; font-size: 11px; }
}

/* ==================== F-NEW2: Rate Cards ==================== */
.rc-card { background: var(--card-bg, var(--card-bg, #00B4D8)); border: 1px solid rgba(148,163,184,.12); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.rc-card-type { font-weight: 600; font-size: 14px; color: var(--text-primary, var(--text-primary, #F8FAFC)); flex: 1; min-width: 120px; }
.rc-card-platform { font-size: 11px; color: var(--text-muted, var(--text-muted, #94A3B8)); background: rgba(148,163,184,.1); padding: 2px 8px; border-radius: 20px; }
.rc-card-price { font-weight: 700; font-size: 18px; color: var(--text-primary, var(--text-primary, #F8FAFC)); min-width: 70px; text-align: right; }
.rc-card-notes { font-size: 12px; color: var(--text-muted, var(--text-muted, #94A3B8)); width: 100%; margin-top: 4px; }
.rc-card-actions { display: flex; gap: 6px; margin-left: auto; }
.rc-card-actions .prf-btn { padding: 4px 8px; font-size: 12px; }

/* ==================== F-NEW2: Contracts ==================== */
.contract-card { background: var(--card-bg, var(--card-bg, #00B4D8)); border: 1px solid rgba(148,163,184,.12); border-radius: 12px; padding: 16px; margin-bottom: 10px; }
.contract-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.contract-header strong { font-size: 14px; color: var(--text-primary, var(--text-primary, #F8FAFC)); }
.contract-status { font-size: 12px; font-weight: 600; }
.contract-meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted, var(--text-muted, #94A3B8)); margin-bottom: 6px; }
.contract-desc { font-size: 12px; color: var(--text-secondary, var(--text-secondary, #CBD5E1)); margin-bottom: 8px; }
.contract-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.contract-actions .prf-btn { padding: 5px 12px; font-size: 12px; }

/* ==================== F-NEW2: Trust Score ==================== */
.trust-score-widget { background: white; border: 1px solid rgba(148,163,184,.12); border-radius: 14px; padding: 18px; }
.trust-score-header { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.trust-score-ring { width: 56px; height: 56px; border-radius: 50%; border: 3px solid var(--ts-color, #22C55E); display: flex; align-items: center; justify-content: center; }
.trust-score-val { font-size: 20px; font-weight: 800; color: var(--text-primary, var(--text-primary, #F8FAFC)); }
.trust-score-label { font-size: 15px; font-weight: 700; }
.trust-score-sub { font-size: 12px; color: var(--text-muted, var(--text-muted, #94A3B8)); }
.trust-factors { color: white; display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.trust-factor { color: white; font-size: 12px; color: var(--text-secondary, var(--text-secondary, #CBD5E1)); display: flex; gap: 6px; }
.trust-summary { margin-top: 10px; font-size: 12px; color: var(--text-muted, var(--text-muted, #94A3B8)); line-height: 1.5; padding-top: 8px; border-top: 1px solid rgba(148,163,184,.08); }

/* ==================== F-NEW2: ROI Estimator ==================== */
.roi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 16px; }
.roi-kpi { background: var(--card-bg, #00B4D8); border: 1px solid rgba(148,163,184,.12); border-radius: 10px; padding: 14px; text-align: center; }
.roi-kpi-val { font-size: 20px; font-weight: 700; color: var(--text-primary, var(--text-primary, #F8FAFC)); }
.roi-kpi-lbl { font-size: 11px; color: var(--text-muted, var(--text-muted, #94A3B8)); margin-top: 2px; }
.roi-breakdown { font-size: 12px; color: var(--text-secondary, var(--text-secondary, #CBD5E1)); }
.roi-plat { display: flex; align-items: center; gap: 6px; padding: 4px 0; }

/* ==================== F-NEW2: Benchmarks ==================== */
.bench-widget { background-color: white; border: 1px solid rgba(148,163,184,.12); border-radius: 14px; padding: 18px; }
.bench-title { font-size: 13px; font-weight: 700; color: var(--text-primary, var(--text-primary, #F8FAFC)); margin-bottom: 10px; }
.bench-bar { margin-bottom: 12px; }
.bench-bar-label { color: white; font-size: 12px; font-weight: 600; color: var(--text-secondary, var(--text-secondary, #CBD5E1)); margin-bottom: 4px; }
.bench-bar-track { color: white; position: relative; height: 8px; background: rgba(148,163,184,.1); border-radius: 4px; overflow: visible; }
.bench-bar-fill { color: white; height: 100%; border-radius: 4px; transition: width .5s ease; }
.bench-bar-avg { color: white; position: absolute; top: -3px; width: 2px; height: 14px; background: var(--text-muted, #94A3B8); border-radius: 1px; }
.bench-bar-vals { color: white; display: flex; justify-content: space-between; margin-top: 4px; font-size: 11px; color: var(--text-muted, #94A3B8); }

/* ==================== F-NEW2: Social Listening ==================== */
.sl-keyword { display: inline-flex; align-items: center; gap: 4px; background: rgba(6,182,212,.12); color: #06B6D4; padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.sl-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sl-stat { background: var(--card-bg, #00B4D8); border: 1px solid rgba(148,163,184,.12); border-radius: 10px; padding: 12px; text-align: center; }
.sl-stat-val { font-size: 22px; font-weight: 700; color: var(--text-primary, #F8FAFC); }
.sl-stat-lbl { font-size: 11px; color: var(--text-muted, #94A3B8); }
.sl-mention { background: var(--card-bg, #00B4D8); border: 1px solid rgba(148,163,184,.12); border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; }
.sl-mention-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 12px; flex-wrap: wrap; }
.sl-mention-content { font-size: 13px; color: var(--text-secondary, #CBD5E1); line-height: 1.5; }
.sl-mention-link { font-size: 12px; color: #06B6D4; text-decoration: none; display: inline-block; margin-top: 4px; }
.sl-mention-link:hover { text-decoration: underline; }
.sl-ai-report { background: var(--card-bg, #00B4D8); border: 1px solid rgba(139,92,246,.25); border-radius: 12px; padding: 16px; }
.sl-ai-sentiment { font-size: 13px; color: var(--text-primary, #F8FAFC); margin-bottom: 8px; }
.sl-ai-themes { font-size: 12px; color: var(--text-secondary, #CBD5E1); margin-bottom: 8px; }
.sl-ai-summary { font-size: 12px; color: var(--text-muted, #94A3B8); line-height: 1.5; margin-bottom: 8px; }
.sl-ai-actions { font-size: 12px; color: var(--text-secondary, #CBD5E1); }
.sl-ai-actions ul { padding-left: 18px; margin-top: 4px; }
.sl-ai-actions li { margin-bottom: 4px; }

/* Profile extra sections */
.prf-extra-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; color: white !important; }
@media (max-width: 768px) {
  .prf-extra-sections { grid-template-columns: 1fr; color: white !important;}
  .sl-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ==================== NEW FEATURES CSS ==================== */

/* Blocked Users */
.blocked-user-item { display:flex; align-items:center; gap:12px; padding:12px; border-bottom:1px solid var(--border-color); }
.blocked-user-item:last-child { border-bottom:none; }
.blocked-user-item .blocked-user-info { flex:1; font-weight:500; }
.blocked-user-item .btn-unblock { background:none; border:1px solid #F87171; color:#F87171; padding:4px 12px; border-radius:6px; cursor:pointer; font-size:12px; }
.blocked-user-item .btn-unblock:hover { background:#F87171; color:#fff; }

/* Chat Attachment */
.chat-attach-btn { background:none; border:none; color:var(--text-muted); cursor:pointer; padding:8px; display:flex; align-items:center; flex-shrink:0; }
.chat-attach-btn:hover { color:var(--primary-color); }
.chat-attachment-preview { display:flex; align-items:center; gap:8px; padding:6px 12px; background:var(--card-bg); border-radius:8px 8px 0 0; border:1px solid var(--border-color); border-bottom:none; font-size:12px; color:var(--text-muted); }
.chat-attachment-preview .remove-attachment { cursor:pointer; color:#F87171; font-weight:bold; margin-left:auto; }
.chat-msg-attachment-img { max-width:240px; max-height:200px; border-radius:8px; margin-bottom:4px; cursor:pointer; display:block; }
.chat-msg-attachment-file { display:inline-block; padding:6px 10px; background:rgba(255,255,255,0.1); border-radius:6px; color:var(--primary-color); text-decoration:none; font-size:12px; margin-bottom:4px; }
.chat-msg-attachment-file:hover { text-decoration:underline; }

/* Post Image */
.post-image-upload-btn { cursor:pointer; display:flex; align-items:center; padding:8px 12px; border-radius:8px; background:var(--card-bg); border:1px solid var(--border-color); font-size:16px; }
.post-image-upload-btn:hover { border-color:var(--primary-color); }
.comm-post-image { max-width:100%; border-radius:8px; margin-top:8px; cursor:pointer; }

/* Seasonal Leaderboard */
.seasonal-header { display:flex; align-items:center; gap:12px; margin-bottom:16px; flex-wrap:wrap; }
.seasonal-header select { padding:8px 12px; border-radius:8px; border:1px solid var(--border-color); background:var(--card-bg); color:var(--text-color); }
.seasonal-my-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin-bottom:20px; }
.seasonal-stat-card { background:var(--card-bg); border:1px solid var(--border-color); border-radius:12px; padding:16px; text-align:center; }
.seasonal-stat-card .stat-value { font-size:24px; font-weight:700; color:var(--primary-color); }
.seasonal-stat-card .stat-label { font-size:12px; color:var(--text-muted); margin-top:4px; }
.seasonal-table { width:100%; border-collapse:separate; border-spacing:0; }
.seasonal-table th { text-align:left; padding:10px 12px; font-size:12px; color:var(--text-muted); border-bottom:1px solid var(--border-color); }
.seasonal-table td { padding:10px 12px; border-bottom:1px solid var(--border-color); }
.seasonal-table tr:last-child td { border-bottom:none; }
.seasonal-table .rank-medal { font-size:18px; }
@media (max-width: 600px) {
  .seasonal-my-stats { grid-template-columns:1fr; }
}

/* Reset Password Modal */
#modal-reset-password .gx-card { max-width:400px; margin:0 auto; }

/* Settings empty state */
.settings-empty { text-align:center; padding:20px; color:var(--text-muted); font-size:13px; }

/* Analytics Charts */
.ca-charts-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; margin-top:20px; }
.ca-chart-box { background:var(--card-bg); border:1px solid var(--border-color); border-radius:12px; padding:16px; }
.ca-chart-box h4 { font-size:13px; font-weight:600; margin-bottom:12px; color:var(--text-color); }
.ca-chart-box canvas { width:100% !important; max-height:200px; }
.ca-platform-breakdown { margin-top:20px; }
.ca-platform-breakdown h4 { font-size:14px; font-weight:600; margin-bottom:12px; }
.ca-platform-table-wrap { overflow-x:auto; }
.ca-platform-table { width:100%; border-collapse:separate; border-spacing:0; background:var(--card-bg); border-radius:12px; border:1px solid var(--border-color); overflow:hidden; }
.ca-platform-table th { text-align:left; padding:10px 14px; font-size:12px; color:var(--text-muted); border-bottom:1px solid var(--border-color); background:var(--bg-secondary, rgba(0,0,0,0.02)); }
.ca-platform-table td { padding:10px 14px; font-size:13px; border-bottom:1px solid var(--border-color); }
.ca-platform-table tr:last-child td { border-bottom:none; }
@media (max-width: 768px) {
  .ca-charts-grid { grid-template-columns:1fr; }
}

/* ==================== Ranking Mobile Edge Spacing Override ==================== */
@media (max-width: 768px) {
  .ranking-hero {
    padding-left: 16px;
    padding-right: 16px;
  }
  .ranking-container {
    padding-left: 14px;
    padding-right: 14px;
  }
}

@media (max-width: 480px) {
  .ranking-hero {
    padding-left: 14px;
    padding-right: 14px;
  }
  .ranking-container {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 360px) {
  .ranking-hero {
    padding-left: 12px;
    padding-right: 12px;
  }
  .ranking-container {
    padding-left: 10px;
    padding-right: 10px;
  }
}

/* ===== CREATOR REVIEWS ===== */
.star-rating-input {
  display: flex;
  gap: 8px;
  font-size: 28px;
  cursor: pointer;
}

.star-input {
  color: var(--text-muted);
  transition: color 0.2s;
  user-select: none;
}

.star-input:hover,
.star-input.active {
  color: #F59E0B;
}

.review-stats-badge {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-secondary);
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

.review-card {
  padding: 16px;
  margin-bottom: 12px;
  background: var(--bg-secondary);
  border-radius: 12px;
}

.review-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.review-stars-display {
  color: #F59E0B;
  font-size: 14px;
}

.review-card-comment {
  font-size: 13px;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.5;
}

/* =============================================
   MOBILE REDESIGN v2.0 — Bottom Nav, Sheets, Touch UX
   Only applies on screens <= 768px
   ============================================= */

:root {
  --bottom-nav-h: 56px;
  --mobile-header-h: 48px;
}

/* Bottom Navigation Bar */
.m-bottom-nav {
  display: none;
  position: fixed !important;
  bottom: 0 !important; left: 0 !important; right: 0 !important;
  height: var(--bottom-nav-h);
  z-index: 200;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: 0 -4px 20px rgba(0,0,0,0.06);
  margin: 0 !important;
}

.m-bottom-nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  height: 100%;
  max-width: 600px;
  margin: 0 auto;
  gap: 0;
}

.m-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  max-width: 80px;
  padding: 4px 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  border-radius: 12px;
  transition: color 0.2s;
}

.m-nav-item svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s;
}

.m-nav-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

.m-nav-item.active {
  color: var(--primary);
}

.m-nav-item.active svg {
  transform: scale(1.05);
}

.m-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2.5px;
  background: var(--primary);
  border-radius: 0 0 4px 4px;
}

.m-nav-item:active {
  transform: scale(0.92);
}

/* More Menu Modal (from bottom nav) */
.m-more-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 190;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.m-more-overlay.open {
  display: block;
  opacity: 1;
}

.m-more-menu {
  position: fixed;
  bottom: var(--bottom-nav-h);
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  padding: 20px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 70vh;
  overflow-y: auto;
}

.m-more-overlay.open .m-more-menu {
  transform: translateY(0);
}

.m-more-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 16px;
}

.m-more-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  padding: 0 4px;
}

.m-more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.m-more-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 14px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
  font-family: var(--font);
}

.m-more-btn:active {
  transform: scale(0.94);
  background: var(--primary-bg);
}

.m-more-btn svg {
  width: 24px;
  height: 24px;
}

.m-more-btn-label {
  font-size: 10px;
  font-weight: 600;
  text-align: center;
}

/* Bottom Sheet */
.m-bottom-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 180;
  background: var(--overlay-bg);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.m-bottom-sheet-overlay.open {
  display: block;
  opacity: 1;
}

.m-bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-radius: 20px 20px 0 0;
  padding: 16px 20px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 40px rgba(0,0,0,0.12);
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 80vh;
  overflow-y: auto;
}

.m-bottom-sheet-overlay.open .m-bottom-sheet {
  transform: translateY(0);
}

.m-sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 4px;
  margin: 0 auto 16px;
}

.m-sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
}

/* Mobile Compact Header */
@media (max-width: 768px) {
  :root {
    --header-h: var(--mobile-header-h);
    --bottom-nav-h: 56px;
  }

  .main {
    padding-bottom: calc(var(--bottom-nav-h) + 8px);
  }

  .header-inner {
    padding: 0 10px !important;
  }

  .header-left {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin-right: 0;
  }

  .header-center {
    display: none !important;
  }

  .header-divider,
  .header-tagline,
  .logo-badge {
    display: none !important;
  }

  .logo-icon {
    display: flex !important;
    width: 28px;
    height: 28px;
  }

  .logo-f {
    font-size: 20px !important;
  }

  .logo-rest {
    font-size: 16px !important;
  }

  .header-right .btn-icon {
    width: 32px;
    height: 32px;
  }

  .header-right .btn-icon svg {
    width: 17px;
    height: 17px;
  }

  .header-right > *:not(#btn-notif):not(.notif-dropdown) {
    display: none !important;
  }

  /* Show bottom nav on mobile */
  .m-bottom-nav {
    display: flex;
  }
}

/* Mobile Page Transitions */
@media (max-width: 768px) {
  .page {
    animation: mPageIn 0.25s ease-out;
  }

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

/* ===== MOBILE RANKING — STESSA CARD DESKTOP, SOLO PIÙ COMPATTA ===== */
@media (max-width: 768px) {
  .ranking-list {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 0 10px 12px !important;
  }

  .rank-card {
    padding: 10px 10px 14px !important;
    gap: 6px !important;
    border-radius: 14px !important;
  }
  .rank-card:hover {
    transform: none !important;
  }
  .rank-card:active {
    transform: scale(0.97);
    transition: transform 0.1s;
  }

  /* Top bar */
  .rank-card-topbar {
    margin-bottom: 6px !important;
    gap: 4px !important;
  }

  /* Rank badge */
  .rank-badge {
    width: 22px !important;
    height: 22px !important;
    font-size: 10px !important;
  }
  .rank-trend { font-size: 9px !important; padding: 1px 4px !important; }
  .rank-trend-arrow { font-size: 8px !important; }
  .rank-trend-val { font-size: 9px !important; }

  /* Compare + Fav — sempre visibili e tappabili */
  .compare-check {
    opacity: 1 !important;
    width: 28px !important;
    height: 28px !important;
    font-size: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
  }
  .fav-btn {
    opacity: 1 !important;
    font-size: 20px !important;
    width: 28px !important;
    height: 28px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    -webkit-tap-highlight-color: transparent;
  }
  .fav-btn:active {
    transform: scale(1.2);
  }

  /* Avatar */
  .rank-avatar-wrap { width: 52px !important; height: 52px !important; }
  .rank-avatar { width: 52px !important; height: 52px !important; font-size: 18px !important; }
  .rank-avatar-ring { inset: -3px !important; }

  /* Nome e handle */
  .rank-card-name { font-size: 12px !important; padding: 0 8px !important; }
  .rank-card-handle { font-size: 10px !important; }

  /* Piattaforme — wrap */
  .rank-card-platforms {
    gap: 3px !important;
    justify-content: center !important;
    flex-wrap: wrap !important;
  }
  .platform-pill {
    padding: 2px 6px !important;
    font-size: 9px !important;
  }

  /* Score */
  .rank-card-metrics { gap: 4px !important; }
  .rank-card-score { padding: 5px 10px !important; font-size: 12px !important; }
  .rank-card-score .score-label { font-size: 8px !important; }
  .rank-card-er { padding: 5px 8px !important; font-size: 11px !important; }
  .rank-card-er .er-label { font-size: 8px !important; }

  /* Footer */
  .rank-card-footer { margin-top: 2px !important; }
  .rank-card-footer .btn { font-size: 10px !important; padding: 5px 12px !important; }

  /* Bio e categorie nascosti per risparmiare spazio */
  .rank-card-bio { display: none !important; }
  .rank-card-categories { display: none !important; }
  .custom-badges-inline { display: none !important; }

  /* ── Header della pagina ── */
  .ranking-hero {
    padding: 12px 14px 6px !important;
  }
  .ranking-hero h1 {
    font-size: 18px !important;
  }
  .ranking-hero h1 span {
    display: block;
    font-size: 12px;
  }
  .ranking-subtitle {
    font-size: 12px !important;
  }

  .ranking-quick-stats {
    padding: 8px 14px !important;
    gap: 8px !important;
    flex-wrap: wrap;
  }
  .rqs-item { flex: 1; min-width: 60px; }
  .rqs-value { font-size: 14px !important; }
  .rqs-label { font-size: 9px !important; }

  .ranking-filters { padding: 8px 14px !important; }
  .filter-group { flex-wrap: wrap; gap: 6px; }
  .filter-select {
    font-size: 12px !important;
    padding: 6px 10px !important;
    min-width: 0;
    flex: 1;
  }
  .btn-toggle-adv-filters {
    font-size: 12px !important;
    padding: 6px 12px !important;
  }
  .advanced-filters { padding: 10px 0 !important; }
  .adv-filter-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }
  .adv-filter-group label { font-size: 11px !important; }
  .adv-filter-group input {
    font-size: 12px !important;
    padding: 6px 10px !important;
  }
  .trending-widget {
    margin: 0 14px 8px !important;
  }
  .trending-title { font-size: 13px !important; }
  .trending-tab {
    font-size: 10px !important;
    padding: 5px 8px !important;
  }
  .filters-row { flex-wrap: wrap; gap: 6px; }
  .filters-row .search-box { width: 100%; }
}

/* Schermi molto piccoli: 1 colonna */
@media (max-width: 400px) {
  .ranking-list {
    grid-template-columns: 1fr !important;
  }
}

/* Mobile Info Page */
@media (max-width: 768px) {
  .info-hero {
    padding: 20px 16px 12px !important;
  }

  .info-tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 4px !important;
    padding: 0 14px !important;
  }

  .info-tabs::-webkit-scrollbar {
    display: none;
  }

  .info-tab {
    font-size: 12px !important;
    padding: 8px 12px !important;
    white-space: nowrap;
    flex-shrink: 0;
  }

  .info-tab svg {
    display: inline-block !important;
    width: 14px;
    height: 14px;
  }

  .info-card {
    padding: 18px 14px !important;
    margin: 0 14px 16px !important;
  }

  .info-card h2 {
    font-size: 17px !important;
  }

  .info-feature-grid {
    grid-template-columns: 1fr !important;
  }

  .info-weight-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .info-account-card {
    flex-direction: column !important;
    text-align: center;
    padding: 16px !important;
  }
}

/* Mobile Stats Page */
@media (max-width: 768px) {
  .stats-content {
    padding: 0 14px 20px !important;
  }

  .stats-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
  }

  .stat-card {
    padding: 16px !important;
  }

  .stat-card-value {
    font-size: 24px !important;
  }
}

/* Mobile Compare Page */
@media (max-width: 768px) {
  .compare-content {
    padding: 0 14px 20px !important;
  }

  .compare-inputs {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .compare-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
}

/* Mobile Events Page */
@media (max-width: 768px) {
  .events-content {
    padding: 0 14px 20px !important;
  }

  .event-card {
    padding: 14px !important;
  }
}

/* Mobile Profile Popup */
@media (max-width: 768px) {
  .popup-content {
    max-width: 95vw !important;
    padding: 16px !important;
  }

  .popup-header {
    flex-direction: column !important;
    text-align: center !important;
    padding: 16px !important;
  }

  .popup-metrics {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .popup-platforms {
    padding: 0 8px 12px !important;
  }

  .popup-platform-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
}

/* Mobile Dashboard */
@media (max-width: 768px) {
  .dashboard-header {
    padding: 20px 14px 0 !important;
  }

  .dashboard-header h1 {
    font-size: 20px !important;
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    padding: 16px 14px 32px !important;
    gap: 12px !important;
  }
}

/* Mobile Creator Dashboard */
@media (max-width: 768px) {
  .cd-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile Brand Dashboard */
@media (max-width: 768px) {
  .bd-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile Admin Page */
@media (max-width: 768px) {
  .admin-hero {
    padding: 16px 14px 0 !important;
  }

  .admin-hero-title {
    font-size: 18px !important;
  }

  .admin-tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 0 14px !important;
    gap: 4px !important;
  }

  .admin-tab-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 12px !important;
    font-size: 12px !important;
  }

  .admin-kpi-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
    padding: 0 14px !important;
  }

  .admin-section {
    padding: 0 10px !important;
  }

  .admin-card {
    padding: 12px !important;
  }
}

/* Mobile Community Page */
@media (max-width: 768px) {
  .comm-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile Chat Page */
@media (max-width: 768px) {
  .chat-page-layout {
    flex-direction: column !important;
  }

  .chat-conversations {
    width: 100% !important;
    max-height: 200px !important;
  }
}

/* Mobile Gamification Hub */
@media (max-width: 768px) {
  .gm-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile Simulator */
@media (max-width: 768px) {
  .sim-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile FAQ */
@media (max-width: 768px) {
  .faq-content {
    padding: 0 14px 20px !important;
  }
  .faq-q {
    font-size: 13px !important;
  }
  .faq-a {
    font-size: 13px !important;
  }
}

/* Mobile Opportunities */
@media (max-width: 768px) {
  .opp-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile Tickets */
@media (max-width: 768px) {
  .tickets-content {
    padding: 0 14px 20px !important;
  }
}

/* Mobile Filter Bar */
.m-filter-bar {
  display: none !important;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.m-filter-bar-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: none;
  background: var(--bg-elevated);
  color: var(--text-secondary);
  border-radius: 10px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}

.m-filter-bar-btn:active {
  background: var(--primary-bg);
  color: var(--primary);
  transform: scale(0.96);
}

.m-filter-bar-btn svg {
  flex-shrink: 0;
}

.m-filter-bar-divider {
  width: 1px;
  height: 20px;
  background: var(--border-light);
  flex-shrink: 0;
}

.m-filter-badge {
  background: var(--band-low);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 50px;
  line-height: 1;
}

.m-search-result:active {
  background: var(--primary-bg);
  border-radius: 8px;
}

/* Forza nascosto su desktop */
@media (min-width: 769px) {
  .m-filter-bar { display: none !important; }
}

@media (max-width: 768px) {
  .m-filter-bar {
    display: flex !important;
  }

  .ranking-filters .filters-row .search-box,
  .ranking-filters .filter-group,
  .ranking-filters .btn-toggle-adv-filters {
    display: none !important;
  }

  .ranking-filters {
    padding: 0 !important;
  }

  .ranking-filters .platform-tabs {
    padding: 6px 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    display: flex;
    gap: 4px;
  }

  .ranking-filters .platform-tabs::-webkit-scrollbar {
    display: none;
  }

  .ranking-filters .advanced-filters {
    padding: 8px 14px !important;
  }
}

/* Compare bar above bottom nav on mobile */
@media (max-width: 768px) {
  .compare-bar {
    bottom: calc(var(--bottom-nav-h) + 8px) !important;
    z-index: 160 !important;
    left: 8px !important;
    right: 8px !important;
    transform: none !important;
    padding: 8px 14px !important;
    border-radius: var(--radius-sm) !important;
  }
  .compare-bar-text { font-size: 12px !important; }
  .compare-bar-btn { font-size: 12px !important; padding: 6px 14px !important; }
}

/* Mobile Pages General */
@media (max-width: 768px) {
  .page-header {
    padding: 16px 14px 0 !important;
  }

  .page-header h1 {
    font-size: 20px !important;
  }

  .main {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .modal {
    max-width: calc(100vw - 24px) !important;
    padding: 20px 16px !important;
    margin: 12px !important;
  }

  .toast-container {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(var(--bottom-nav-h) + 16px) !important;
  }

  .toast {
    font-size: 12px !important;
    padding: 10px 16px !important;
  }
}

/* Chatbot FAB position on mobile — above bottom nav */
@media (max-width: 768px) {
  .chatbot-fab {
    bottom: calc(var(--bottom-nav-h) + 16px) !important;
    right: 16px !important;
    width: 48px !important;
    height: 48px !important;
  }

  .chatbot-fab svg {
    width: 22px !important;
    height: 22px !important;
  }

  .chatbot-container {
    bottom: calc(var(--bottom-nav-h) + 4px) !important;
    right: 8px !important;
    max-height: calc(70vh - var(--bottom-nav-h)) !important;
  }
}

/* Safe area for notched devices — solo contenuti interni, non la barra */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .main {
    padding-bottom: calc(var(--bottom-nav-h) + 8px + env(safe-area-inset-bottom));
  }
}

/* Pull-to-refresh indicator */
.m-pull-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 0;
  overflow: hidden;
  transition: height 0.2s;
  color: var(--text-muted);
  font-size: 12px;
  gap: 6px;
}

.m-pull-indicator.active {
  height: 40px;
}

.m-pull-indicator svg {
  width: 18px;
  height: 18px;
  animation: mPullSpin 0.8s linear infinite;
}

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

/* Touch ripple effect */
.m-ripple {
  position: relative;
  overflow: hidden;
}

.m-ripple::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(13, 148, 136, 0.15) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.m-ripple:active::after {
  opacity: 1;
}

/* Hide mobile search on desktop */
@media (min-width: 769px) {
  #btn-mobile-search { display: none !important; }
}

/* More Menu User Section */
.m-more-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 4px 16px;
  border-bottom: 1px solid var(--border-light);
  margin-bottom: 12px;
}

.m-more-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0D9488, #06B6D4);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  font-weight: 700;
  font-size: 16px;
  color: #fff;
}

.m-more-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.m-more-avatar svg {
  color: #fff;
  width: 20px;
  height: 20px;
}

.m-more-user-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.m-more-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border-light);
}

.m-more-login,
.m-more-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 12px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: all 0.2s;
}

.m-more-login {
  background: var(--primary);
  color: #fff;
}

.m-more-login:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.m-more-logout {
  background: rgba(239, 68, 68, 0.08);
  color: #ef4444;
}

.m-more-logout:active {
  background: rgba(239, 68, 68, 0.15);
  transform: scale(0.98);
}

/* Mobile search overlay — now inline styles via JS */

.m-search-overlay.open {
  display: flex;
  flex-direction: column;
}

.m-search-overlay .search-box {
  width: 100%;
  margin-bottom: 12px;
}

.m-search-overlay .search-box input {
  font-size: 16px;
  padding: 12px 14px 12px 40px;
}

.m-search-overlay-close {
  position: absolute;
  top: calc(var(--mobile-header-h) + 12px);
  right: 16px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  padding: 4px;
}

/* Tablet-sized (481-768) — 2 columns compact */
@media (min-width: 481px) and (max-width: 768px) {
  .ranking-list {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* ===== ADMIN INFLUENCER TAB — MOBILE FIX ===== */
@media (max-width: 768px) {
  .admin-tab-panel {
    padding: 14px 10px 24px !important;
  }

  .admin-panel-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    padding: 0 2px;
  }
  .admin-panel-toolbar .admin-section-heading {
    font-size: 15px;
    margin-bottom: 0;
  }
  .admin-panel-toolbar .btn-primary-sm {
    font-size: 12px;
    padding: 6px 12px;
    white-space: nowrap;
  }

  .admin-filters .filters-row {
    flex-direction: column;
    gap: 6px;
  }
  .admin-filters .search-box {
    min-width: 0;
    max-width: none;
    width: 100%;
  }
  .admin-filters .filter-group {
    width: 100%;
    display: flex;
    gap: 6px;
  }
  .admin-filters .filter-group .filter-select {
    flex: 1;
    font-size: 12px !important;
    padding: 5px 8px !important;
  }
  .admin-filters .btn-toggle-adv-filters {
    font-size: 11px;
    padding: 5px 10px;
    margin-top: 4px;
  }
  .admin-filters .advanced-filters .adv-filter-row {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px;
  }
  .admin-filters .advanced-filters .adv-filter-group label {
    font-size: 10px;
  }
  .admin-filters .advanced-filters .adv-filter-group input,
  .admin-filters .advanced-filters .adv-filter-group select {
    font-size: 12px;
    padding: 5px 8px;
  }
  .admin-filter-count {
    font-size: 11px;
    padding: 4px 2px;
  }

  .admin-list { gap: 6px; }

  .admin-card { border-radius: 12px !important; }

  .admin-card-header {
    flex-direction: row !important;
    flex-wrap: wrap;
    align-items: center !important;
    gap: 6px;
    padding: 10px 10px !important;
  }

  .admin-card-header .admin-card-avatar-wrap {
    width: 40px;
    height: 40px;
  }
  .admin-card-header .admin-card-avatar,
  .admin-card-header .admin-card-avatar-fallback {
    width: 40px;
    height: 40px;
    font-size: 13px;
    border-width: 2px;
  }

  .admin-card-header .admin-card-name {
    font-size: 13px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .admin-card-header .admin-card-name .verified-badge {
    width: 16px;
    height: 16px;
  }
  .admin-card-header .admin-card-meta {
    font-size: 10px;
    width: 100%;
    order: 10;
    margin-top: 0;
  }

  .admin-card-right {
    width: auto !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 6px;
    justify-content: flex-end !important;
  }

  .admin-card-controls {
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px;
  }
  .admin-card-controls .btn-admin-action {
    font-size: 10px;
    padding: 4px 8px;
    white-space: nowrap;
  }
  .admin-card-controls .btn-icon {
    width: 26px;
    height: 26px;
  }

  .admin-card-chevron {
    align-self: center !important;
    width: 16px;
    height: 16px;
  }

  .admin-card-body {
    padding: 10px 12px !important;
    gap: 10px;
    overflow-y: auto !important;
    max-height: 60vh !important;
  }

  .admin-card-bio {
    font-size: 12px;
    padding: 8px 10px !important;
    max-height: none;
    min-height: 0;
  }

  .admin-platforms {
    padding: 8px 10px 10px !important;
    gap: 6px;
  }
  .admin-platform-row {
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .admin-platform-row .platform-pill {
    font-size: 9px;
    padding: 2px 6px;
  }

  .admin-card-header .custom-badges-inline {
    width: 100%;
    order: 12;
    gap: 4px;
    margin: 0;
  }
  .admin-card-header .custom-badge-chip-sm {
    font-size: 8px;
    padding: 1px 5px;
  }

  .admin-add-platform-row {
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px !important;
  }
  .admin-add-platform-row .input-sm {
    width: 100%;
  }
}

/* Tablet admin filters row fix */
@media (min-width: 481px) and (max-width: 768px) {
  .admin-filters .filters-row {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .admin-filters .search-box {
    max-width: 200px;
  }
  .admin-filters .filter-group {
    width: auto;
  }
}

/* ===== LEGAL FOOTER ===== */
.legal-footer {
  text-align: center;
  padding: 16px 16px 20px;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.legal-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}
.legal-footer a:hover {
  color: var(--primary);
  text-decoration: underline;
}
.legal-footer-dot {
  color: var(--border);
}

@media (max-width: 768px) {
  .legal-footer {
    padding: 12px 16px calc(12px + var(--bottom-nav-h));
    font-size: 11px;
  }
}

/* ===== CALENDAR (Content Scheduler) ===== */
.cal-page { max-width: 900px; margin: 0 auto; padding: 20px; }
.cal-hero { margin-bottom: 20px; }
.cal-hero h1 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.cal-hero h1 span { color: var(--primary); }
.cal-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.cal-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.cal-nav { display: flex; align-items: center; gap: 12px; }
.cal-month-label { font-size: 16px; font-weight: 600; min-width: 160px; text-align: center; }
.cal-stats-bar { display: flex; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-stat { background: var(--bg-card); padding: 8px 16px; border-radius: 8px; font-size: 13px; }
.cal-stat strong { color: var(--primary); font-size: 16px; }
.cal-grid { background: var(--bg-card); border-radius: 12px; overflow: hidden; border: 1px solid var(--border); margin-bottom: 20px; }
.cal-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--bg-elevated); }
.cal-weekdays div { padding: 10px 4px; text-align: center; font-size: 12px; font-weight: 600; color: var(--text-muted); }
.cal-days { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day { min-height: 80px; border: 1px solid var(--border); padding: 6px; cursor: pointer; position: relative; transition: background 0.2s; }
.cal-day:hover { background: var(--bg-elevated); }
.cal-day-today .cal-day-num { background: var(--primary); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; }
.cal-day-num { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cal-day-empty { background: var(--bg-elevated); }
.cal-day-dots { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 4px; }
.cal-dot { width: 6px; height: 6px; border-radius: 50%; }
.cal-upcoming { background: var(--bg-card); border-radius: 12px; padding: 16px; border: 1px solid var(--border); }
.cal-upcoming h3 { font-size: 15px; margin-bottom: 12px; }
.cal-upcoming-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 8px; background: var(--bg); margin-bottom: 6px; }
.cal-upcoming-item strong { flex: 1; font-size: 13px; }
.cal-upcoming-date { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

/* ===== HASHTAG ANALYTICS ===== */
.ht-page { max-width: 900px; margin: 0 auto; padding: 20px; }
.ht-hero h1 { font-size: 24px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.ht-hero h1 span { color: var(--primary); }
.ht-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.ht-toolbar { margin: 16px 0; }
.ht-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ht-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px; cursor: pointer; transition: border-color 0.2s; }
.ht-card:hover { border-color: var(--primary); }
.ht-card-header { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--primary); }
.ht-card-meta { font-size: 12px; color: var(--text-muted); margin-bottom: 12px; }
.ht-card-active { font-weight: 600; }
.ht-card-active.active { color: var(--success); }
.ht-empty { text-align: center; padding: 40px; color: var(--text-muted); }
.ht-detail { padding: 20px 0; }
.ht-detail-header h2 { font-size: 20px; margin-bottom: 16px; }
.ht-top-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.ht-top-item { padding: 8px 12px; background: var(--bg); border-radius: 8px; font-size: 13px; }
.ht-mentions-list { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; max-height: 400px; overflow-y: auto; }
.ht-mention-item { display: flex; gap: 12px; align-items: center; padding: 6px 10px; background: var(--bg); border-radius: 6px; font-size: 12px; }
.ht-mention-sentiment { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.ht-mention-sentiment.positive { background: rgba(34,197,94,0.15); color: #22c55e; }
.ht-mention-sentiment.neutral { background: rgba(107,114,128,0.15); color: #6b7280; }
.ht-mention-sentiment.negative { background: rgba(239,68,68,0.15); color: #ef4444; }

/* ===== AUTHENTICITY ===== */
.aa-item { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--bg); border-radius: 8px; margin-bottom: 6px; }
.aa-item span { flex: 1; font-size: 13px; }
.badge-error { background: rgba(239,68,68,0.15); color: #ef4444; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-warning { background: rgba(234,179,8,0.15); color: #eab308; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-ok { background: rgba(34,197,94,0.15); color: #22c55e; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* ===== TENANCY ===== */
.admin-table { overflow-x: auto; }
.admin-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { background: var(--bg-elevated); font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table td { color: var(--text-secondary); }
.admin-table td strong { color: var(--text); }
