/* =============================================================
   SwiftReview — User Profile (Dashboard)
   Designer: edit this file to change styles for the user profile dashboard
   Variables (colours, fonts) are in :root at the top.
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --teal: #0FBDA1;
  --teal-light: #e8faf7;
  --navy: #1A1A2E;
  --text: #1a1a2e;
  --muted: #888;
  --border: #e8e8e8;
  --bg: #f5f7f6;
  --white: #fff;
}

body {
  font-family: 'Figtree', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* ── Top Nav ────────────────────────────────────────────────────────────── */
.top-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  height: 64px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
  text-decoration: none;
}
.nav-logo svg { flex-shrink: 0; }
.nav-logo-img { height: 28px; width: auto; display: block; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  position: relative;
  transition: color 0.15s;
}
.nav-item svg { color: var(--muted); transition: color 0.15s; }
.nav-item.active { color: var(--navy); border-bottom: 2px solid var(--navy); border-radius: 0; }
.nav-item.active svg { color: var(--navy); }
.notif-badge {
  position: absolute;
  top: 4px;
  right: 10px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* ── Notification Panel ────────────────────────────────────────────────── */
.nav-notif-wrap { position: relative; }
.notif-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: -40px;
  width: 380px;
  max-height: 480px;
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 300;
  overflow: hidden;
  cursor: default;
}
.notif-panel.open { display: flex; flex-direction: column; }
.notif-panel-header {
  padding: 16px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.notif-panel-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--navy);
}
.notif-panel-count {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  margin-top: 2px;
}
.notif-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}
.notif-panel-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 20px;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  transition: background 0.12s;
  cursor: default;
  position: relative;
}
.notif-item:hover { background: var(--bg); }
.notif-item + .notif-item { border-top: 1px solid #f5f5f5; }
.notif-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.notif-icon--star { background: #FEF3C7; }
.notif-icon--verified { background: #DBEAFE; }
.notif-icon--milestone { background: #DCFCE7; }
.notif-icon--unlock { background: #F3E8FF; }
.notif-icon--rank { background: #E0F2FE; }
.notif-icon--profile { background: #FEE2E2; }
.notif-icon--info { background: #F0F0F0; }
.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 3px;
}
.notif-message {
  font-size: 12px;
  color: #6B7A8D;
  line-height: 1.45;
}
.notif-time {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3B82F6;
  flex-shrink: 0;
  margin-top: 4px;
}
.notif-panel-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.notif-panel-footer a {
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}
.notif-panel-footer a:hover { text-decoration: underline; }
.nav-me {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--navy);
  transition: background 0.15s;
  position: relative;
}
.nav-me:hover { background: var(--bg); }

/* ── Me Dropdown ───────────────────────────────────────────────────────── */
.me-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
  z-index: 300;
  padding: 8px 0;
  cursor: default;
}
.me-dropdown.open { display: block; }
.me-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
}
.me-dropdown-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.me-dropdown-avatar--placeholder {
  background: var(--teal-light);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
}
.me-dropdown-info { flex: 1; min-width: 0; }
.me-dropdown-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.me-dropdown-role {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.me-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.me-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--navy);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.12s;
}
.me-dropdown-item:hover { background: var(--bg); }
.me-dropdown-item svg { color: var(--muted); flex-shrink: 0; }
.me-dropdown-item--disabled {
  color: #C4CDD6;
  cursor: not-allowed;
}
.me-dropdown-item--disabled:hover { background: none; }
.me-dropdown-item--disabled svg { color: #D1D9E0; }
.me-dropdown-item--logout { color: #E11D48; }
.me-dropdown-item--logout svg { color: #E11D48; }
.me-dropdown-item--logout:hover { background: #FFF1F2; }
.nav-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--border);
}
.nav-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

/* ── Quick Links ────────────────────────────────────────────────────────── */
.quick-links-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 12px 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.quick-links-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.quick-link-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--white);
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.quick-link-btn:hover { border-color: var(--teal); background: var(--teal-light); }
.quick-link-btn svg { color: var(--muted); }

/* ── Main content ───────────────────────────────────────────────────────── */
.main-content {
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 24px 64px;
}

/* ── Profile Card ───────────────────────────────────────────────────────── */
.profile-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07);
  padding: 40px 40px 32px;
}

/* Header row: avatar+info on left, QR on right */
.profile-header-row {
  display: flex;
  align-items: flex-start;
  gap: 32px;
}
.profile-left {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  flex: 1;
  min-width: 0;
}

/* ── Avatar ─────────────────────────────────────────────────────────────── */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.avatar-ring {
  width: 110px;
  height: 110px;
  border-radius: 20px;
  border: 3px solid transparent;
  background:
    linear-gradient(var(--white), var(--white)) padding-box,
    linear-gradient(135deg, var(--teal), #0a9e88) border-box;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: opacity 0.15s;
}
.avatar-ring:hover { opacity: 0.9; }
.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}
.avatar-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--teal);
  background: var(--teal-light);
  width: 100%;
  height: 100%;
  border-radius: 16px;
}
.avatar-placeholder span {
  font-size: 11px;
  font-weight: 600;
  color: var(--teal);
}
.avatar-edit-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.35);
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s;
}
.avatar-wrap:hover .avatar-edit-overlay { opacity: 1; }
.avatar-verified {
  position: absolute;
  bottom: -6px;
  right: -6px;
  width: 28px;
  height: 28px;
  background: #2563eb;
  border: 2.5px solid var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-verified svg { color: #fff; }

/* ── Profile Info ───────────────────────────────────────────────────────── */
.profile-info { flex: 1; min-width: 0; padding-top: 4px; }
.profile-name {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
  margin-bottom: 6px;
}
.profile-nickname {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 500;
}
.profile-nickname strong { color: var(--navy); }
.profile-role-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 10px;
}
.profile-location {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: #555;
}
.profile-location svg { flex-shrink: 0; color: var(--teal); }

/* ── QR Panel ───────────────────────────────────────────────────────────── */
.qr-panel {
  flex-shrink: 0;
  width: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.qr-panel-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}
.qr-frame {
  border: 2.5px solid var(--teal);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.qr-frame:hover { box-shadow: 0 4px 16px rgba(15,189,161,0.2); }
#qrCodeEl canvas, #qrCodeEl img { display: block; border-radius: 4px; }
.qr-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}
.qr-updated {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
}
.qr-panel-actions {
  display: flex;
  gap: 8px;
  width: 100%;
}
.qr-panel-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  font-weight: 600;
  font-size: 13px;
  transition: opacity 0.15s;
}
.qr-panel-btn:hover { opacity: 0.85; }
.qr-btn-share { background: var(--teal); color: #fff; }
.qr-btn-download { background: var(--navy); color: #fff; }
.qr-wallet-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #1A1A2E;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 10px;
  margin-top: 6px;
  cursor: pointer;
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 600;
  transition: opacity 0.15s;
}
.qr-wallet-btn:hover { opacity: 0.85; }
.qr-wallet-icon { flex-shrink: 0; }

/* ── Divider ────────────────────────────────────────────────────────────── */
.profile-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* ── Section ────────────────────────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.section-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--teal);
  flex-shrink: 0;
}
.section-heading {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
}
.edit-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  display: flex;
  align-items: center;
}
.edit-icon-btn:hover { color: var(--navy); background: var(--bg); }

.summary-text {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
}
.summary-text.empty-state { color: #bbb; font-style: italic; }
.role-tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: #f0fdf9;
  color: #0a9e88;
  border: 1px solid #b6ece4;
}
.summary-more {
  color: var(--teal);
  cursor: pointer;
  font-weight: 600;
}
.since-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 10px;
  font-weight: 500;
}
.since-tag svg { color: var(--muted); }
.role-desc-text {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 16px;
}
.view-history-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
  cursor: pointer;
}
.view-history-link:hover { text-decoration: underline; }

/* ── Photo Sheet ────────────────────────────────────────────────────────── */
.sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 200;
}
.sheet-overlay.open { display: block; }
.photo-sheet {
  position: fixed;
  bottom: -100%;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: 20px 20px 0 0;
  padding: 16px 24px 32px;
  z-index: 201;
  transition: bottom 0.3s cubic-bezier(0.32,0.72,0,1);
}
.photo-sheet.open { bottom: 0; }
.sheet-handle {
  width: 36px;
  height: 4px;
  background: var(--border);
  border-radius: 999px;
  margin: 0 auto 20px;
}
.sheet-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
  margin-bottom: 20px;
}
.sheet-option {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: none;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
  margin-bottom: 6px;
}
.sheet-option:hover { background: var(--bg); }
.sheet-option-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sheet-option-icon.cam { background: #eff6ff; color: #3b82f6; }
.sheet-option-icon.gallery { background: #faf5ff; color: #8b5cf6; }
.sheet-option-icon.default { background: var(--teal-light); color: var(--teal); }
.sheet-cancel {
  width: 100%;
  padding: 14px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: none;
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s;
}
.sheet-cancel:hover { background: var(--bg); }

/* ── Loading skeleton ───────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Toast ──────────────────────────────────────────────────────────────── */
#toast {
  display: none;
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 9999;
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════════
   SHARED SECTION CARD
══════════════════════════════════════════════════════════════ */
.section-card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.07);
  padding: 32px 40px;
  margin-top: 20px;
}
.section-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
.section-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 700;
  color: var(--navy);
}
.section-card-sub {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}


/* ══════════════════════════════════════════════════════════════
   SENTIMENT ANALYSIS
══════════════════════════════════════════════════════════════ */
.sentiment-body {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 32px;
  align-items: center;
}

.sentiment-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  background: var(--teal-light);
  border-radius: 16px;
  padding: 24px 16px;
}
.sentiment-big-score {
  font-size: 52px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
  letter-spacing: -1px;
}
.sentiment-score-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sentiment-stars {
  font-size: 20px;
  color: #f0bc10;
  letter-spacing: 2px;
  margin-top: 4px;
}

.sentiment-bars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.sentiment-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 40px;
  align-items: center;
  gap: 12px;
}
.sentiment-bar-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--navy);
  white-space: nowrap;
}
.sentiment-bar-track {
  height: 8px;
  background: #f0f0f0;
  border-radius: 100px;
  overflow: hidden;
}
.sentiment-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal), #0a9e88);
  border-radius: 100px;
  transition: width 0.6s ease;
  width: 0%;
}
.sentiment-bar-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  text-align: right;
}
.sentiment-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}


/* ══════════════════════════════════════════════════════════════
   LEADERBOARD
══════════════════════════════════════════════════════════════ */
.my-rank-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--teal-light);
  border-radius: 14px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
.my-rank-badge {
  font-size: 28px;
  font-weight: 800;
  color: var(--teal);
  min-width: 60px;
  text-align: center;
}
.my-rank-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.my-rank-reviews {
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}

.lb-header-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 100px;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.lb-row {
  display: grid;
  grid-template-columns: 60px 1fr 1fr 100px;
  padding: 12px 12px;
  align-items: center;
  border-radius: 10px;
  transition: background 0.15s;
  font-size: 14px;
}
.lb-row:hover { background: var(--bg); }
.lb-row--me { background: var(--teal-light); font-weight: 700; }
.lb-rank {
  font-weight: 700;
  color: var(--navy);
  font-size: 15px;
}
.lb-rank-medal { font-size: 20px; }
.lb-name { font-weight: 600; color: var(--navy); }
.lb-role { color: var(--muted); font-size: 13px; }
.lb-reviews {
  display: inline-flex;
  padding: 3px 10px;
  background: var(--teal-light);
  color: var(--teal);
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}
.lb-row--me .lb-reviews { background: var(--teal); color: #fff; }


/* ══════════════════════════════════════════════════════════════
   REVIEWS
══════════════════════════════════════════════════════════════ */
.reviews-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--teal-light);
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 100px;
  margin-left: 4px;
}

.reviews-sort {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.sort-btn {
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}
.sort-btn:hover { border-color: var(--teal); color: var(--teal); }
.sort-btn--active { border-color: var(--teal); background: var(--teal-light); color: var(--teal); }

/* Review card */
.review-card {
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px 24px;
  margin-bottom: 12px;
  transition: box-shadow 0.15s;
  position: relative;
}
.review-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.review-card:last-child { margin-bottom: 0; }

.review-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.review-card-left { display: flex; align-items: center; gap: 14px; }

.review-avg-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: var(--teal-light);
  flex-shrink: 0;
}
.review-avg-num {
  font-size: 22px;
  font-weight: 800;
  color: var(--teal);
  line-height: 1;
}
.review-avg-denom {
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.review-stars-row {
  font-size: 18px;
  color: #f0bc10;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.review-timestamp {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.review-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* Verified / not-verified badge */
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.verified-badge--no {
  background: #f5f5f5;
  color: #aaa;
  border: 1px solid #e0e0e0;
}
.verified-badge--yes {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

/* Public / hidden toggle */
.visibility-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  font-family: 'Figtree', sans-serif;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.visibility-btn--public {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal);
}
.visibility-btn--hidden {
  border-color: var(--border);
  background: var(--bg);
  color: var(--muted);
}
.visibility-btn:hover { opacity: 0.8; }

/* Per-question mini bars */
.review-question-bars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.review-q-bar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.review-q-label {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  text-align: center;
  line-height: 1.2;
}
.review-q-track {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 100px;
  overflow: hidden;
}
.review-q-fill {
  height: 100%;
  background: var(--teal);
  border-radius: 100px;
}
.review-q-score {
  font-size: 11px;
  font-weight: 700;
  color: var(--navy);
}

.reviews-empty {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 32px 0;
}


/* ══════════════════════════════════════════════════════════════
   KPI CARDS
══════════════════════════════════════════════════════════════ */
.kpi-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.kpi-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  padding: 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.kpi-icon--green { background: #dcfce7; color: #16a34a; }
.kpi-icon--blue  { background: #dbeafe; color: #2563eb; }
.kpi-icon--yellow{ background: #fef9c3; color: #ca8a04; }
.kpi-body { flex: 1; min-width: 0; }
.kpi-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
}
.kpi-number {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
}
.kpi-number > span:first-child {
  font-size: 36px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.kpi-delta { font-size: 13px; font-weight: 700; }
.kpi-delta--up   { color: #16a34a; }
.kpi-delta--down { color: #dc2626; }
.kpi-delta--flat { color: var(--muted); }
.kpi-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}
.kpi-link:hover { text-decoration: underline; }


/* ══════════════════════════════════════════════════════════════
   UNLOCK CARD
══════════════════════════════════════════════════════════════ */
.unlock-card {
  background: var(--white);
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  padding: 24px;
  margin-top: 20px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-left: 4px solid #f59e0b;
}
.unlock-card--unlocked { border-left-color: #16a34a; }
.unlock-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fef3c7;
  color: #d97706;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.unlock-body { flex: 1; min-width: 0; }
.unlock-title { font-size: 16px; font-weight: 700; color: var(--navy); margin-bottom: 4px; }
.unlock-sub { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.unlock-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 8px;
}
.unlock-bar-track { height: 8px; background: #f0f0f0; border-radius: 100px; overflow: hidden; }
.unlock-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-radius: 100px;
  transition: width 0.6s ease;
}


/* ══════════════════════════════════════════════════════════════
   SENTIMENT + LEADERBOARD GRID
══════════════════════════════════════════════════════════════ */
.sentiment-lb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}
.sentiment-lb-grid > .section-card { margin-top: 0; }


/* ── Circular Gauge ─────────────────────────────────────────────────────── */
.gauge-wrap {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 24px;
  width: 160px;
  height: 160px;
}
.gauge-svg { display: block; }
.gauge-center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.gauge-score {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}
.gauge-label {
  font-size: 13px;
  font-weight: 700;
  color: #22c55e;
  margin-top: 4px;
}


/* ── Positive / Neutral / Negative bars ────────────────────────────────── */
.pnn-list { display: flex; flex-direction: column; gap: 12px; }
.pnn-row {
  display: grid;
  grid-template-columns: 24px 72px 1fr 38px;
  align-items: center;
  gap: 8px;
}
.pnn-emoji { font-size: 16px; text-align: center; }
.pnn-name { font-size: 13px; font-weight: 600; color: var(--navy); }
.pnn-track { height: 8px; background: #f0f0f0; border-radius: 100px; overflow: hidden; }
.pnn-fill { height: 100%; border-radius: 100px; transition: width 0.6s ease; }
.pnn-fill--pos { background: #22c55e; }
.pnn-fill--neu { background: #f59e0b; }
.pnn-fill--neg { background: #ef4444; }
.pnn-pct { font-size: 12px; font-weight: 700; text-align: right; }
.pnn-pct--pos { color: #16a34a; }
.pnn-pct--neu { color: #d97706; }
.pnn-pct--neg { color: #dc2626; }

.sentiment-insight {
  background: var(--teal-light);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  color: var(--navy);
  margin-top: 16px;
  line-height: 1.5;
}
.sentiment-empty-msg {
  text-align: center;
  color: var(--muted);
  font-size: 14px;
  padding: 24px 0;
}


/* ── Leaderboard (new layout) ───────────────────────────────────────────── */
.lb-pos-row {
  display: flex;
  align-items: center;
  gap: 16px;
  border-radius: 12px;
  padding: 16px 0;
  margin-bottom: 4px;
}
.lb-rank-chip {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  min-width: 56px;
  height: 56px;
  background: var(--teal);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-pos-title { font-size: 18px; font-weight: 700; color: var(--navy); }
.lb-pos-sub { font-size: 13px; color: var(--muted); font-weight: 500; margin-top: 4px; }

.lb-local-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 12px;
}
.lb-local-heading svg { color: var(--teal); flex-shrink: 0; }

.lb-local-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
  transition: background 0.15s;
}
.lb-local-row:hover { background: var(--bg); }
.lb-local-row--me { background: var(--teal-light); }
.lb-local-rank {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
  width: 28px;
  flex-shrink: 0;
  text-align: center;
}
.lb-local-name { flex: 1; font-size: 14px; font-weight: 600; color: var(--navy); }
.lb-local-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--teal-light);
  color: var(--teal);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
}
.lb-local-row--me .lb-local-count { background: var(--teal); color: #fff; }

.lb-see-all-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: none;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  margin-top: 16px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.lb-see-all-btn:hover { border-color: var(--teal); background: var(--teal-light); color: var(--teal); }


/* ══════════════════════════════════════════════════════════════
   REVIEWS — updated layout
══════════════════════════════════════════════════════════════ */
.reviews-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
  flex-wrap: wrap;
}
.reviews-title { font-size: 17px; font-weight: 700; color: var(--navy); }

.reviews-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.sort-select-wrap { position: relative; display: flex; align-items: center; }
.sort-select {
  appearance: none;
  padding: 7px 36px 7px 12px;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  background: var(--white);
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}
.sort-select:focus { border-color: var(--teal); }
.sort-select-icon {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--muted);
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 100px;
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: var(--muted);
  transition: all 0.15s;
}
.filter-btn--verified.filter-btn--active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #2563eb;
}
.filter-btn--all.filter-btn--active {
  border-color: var(--teal);
  background: var(--teal-light);
  color: var(--teal);
}
.filter-btn:not(.filter-btn--active):hover { border-color: var(--muted); }

/* Sentiment badge on review card */
.sentiment-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
}
.sentiment-badge--positive { background: #dcfce7; color: #16a34a; }
.sentiment-badge--neutral  { background: #fef9c3; color: #ca8a04; }
.sentiment-badge--negative { background: #fee2e2; color: #dc2626; }

/* Review text (AI-generated) */
.review-text {
  font-size: 14px;
  line-height: 1.7;
  color: #444;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.review-text-placeholder {
  font-size: 13px;
  color: #bbb;
  font-style: italic;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}


/* ── Verified Reviews tooltip ──────────────────────────────────────────── */
.kpi-tooltip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.kpi-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a1a2e;
  color: #fff;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 10px;
  width: 240px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
  pointer-events: none;
  z-index: 200;
}
.kpi-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a1a2e;
}
.kpi-tooltip-wrap:hover .kpi-tooltip { display: block; }

/* ── Sentiment insight ─────────────────────────────────────────────────── */
.sentiment-insight {
  background: #F8F9FA;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 13px;
  color: #374151;
  line-height: 1.55;
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}
.sentiment-insight strong { color: var(--navy); font-weight: 700; }

/* ── Filter toggle (segmented) ──────────────────────────────────────────── */
.filter-toggle {
  display: flex;
  border: 1.5px solid var(--border);
  border-radius: 100px;
  overflow: hidden;
  background: var(--white);
}
.filter-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  font-family: 'Figtree', sans-serif;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: transparent;
  border: none;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.filter-toggle-btn + .filter-toggle-btn {
  border-left: 1.5px solid var(--border);
}
.filter-toggle-btn--active {
  background: var(--white);
  color: var(--navy);
  box-shadow: inset 0 0 0 1.5px var(--border);
}
#filterVerifiedBtn.filter-toggle-btn--active {
  color: #059669;
}
#filterVerifiedBtn.filter-toggle-btn--active svg { stroke: #059669; }
.filter-toggle-btn:not(.filter-toggle-btn--active):hover { color: var(--navy); }

/* ── Review card (redesigned) ───────────────────────────────────────────── */
.review-card {
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
  margin-bottom: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid var(--border);
}
.review-card:last-child { border-bottom: none; }
.review-card:hover { box-shadow: none; }

.review-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: nowrap;
}
.review-card-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.review-stars-row {
  font-size: 17px;
  color: #F59E0B;
  letter-spacing: 1px;
  line-height: 1;
}
.verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
}
.verified-badge--yes {
  background: #ECFDF5;
  color: #059669;
  border: 1px solid #A7F3D0;
}
.verified-badge--no {
  background: #f5f5f5;
  color: #aaa;
  border: 1px solid #e0e0e0;
}

.visibility-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 100px;
  font-family: 'Figtree', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  border: 1.5px solid var(--border);
  background: var(--white);
  color: #6B7A8D;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.visibility-btn--public { color: #6B7A8D; }
.visibility-btn--hidden {
  border-color: #FECDD3;
  background: #FFF1F2;
  color: #E11D48;
}
.visibility-btn:hover { opacity: 0.8; }

.review-text {
  font-size: 14px;
  line-height: 1.7;
  color: #374151;
  margin-bottom: 8px;
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.review-text--hidden {
  text-decoration: line-through;
  color: #9CA3AF;
}
.review-text-placeholder {
  font-size: 13px;
  color: #bbb;
  font-style: italic;
  margin-bottom: 8px;
  border-top: none;
  margin-top: 0;
  padding-top: 0;
}
.review-footer {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}
.review-footer svg { color: var(--muted); flex-shrink: 0; }

/* ── Leaderboard avatars ────────────────────────────────────────────────── */
.lb-local-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 6px;
  border-radius: 10px;
  transition: background 0.15s;
}
.lb-avatar-wrap {
  position: relative;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.lb-avatar-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}
.lb-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #E5E7EB;
  color: #9CA3AF;
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-rank-badge {
  position: absolute;
  bottom: -2px;
  left: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #F59E0B;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid #fff;
}
.lb-rank-badge--plain {
  background: #D1D9E0;
  color: var(--navy);
}
.lb-local-info { flex: 1; min-width: 0; }
.lb-local-name { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lb-local-count { font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 1px; }
.lb-local-row--me .lb-local-name { color: var(--teal); }
.lb-local-row--private .lb-local-name { color: var(--muted); font-style: italic; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sentiment-lb-grid { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .top-nav { padding: 0 16px; }
  .quick-links-bar { padding: 10px 16px; gap: 8px; }
  .main-content { margin: 16px auto; padding: 0 12px 48px; }
  .profile-card { padding: 24px 20px 20px; border-radius: 16px; }
  .section-card { padding: 24px 20px; border-radius: 16px; }
  .profile-header-row { flex-direction: column; gap: 24px; }
  .qr-panel { width: 100%; }
  .qr-panel-actions { max-width: 240px; margin: 0 auto; }
  .profile-name { font-size: 24px; }
  .nav-item span { display: none; }
  .section-card-header { flex-direction: column; align-items: flex-start; }
  .reviews-header { flex-direction: column; align-items: flex-start; }
  .reviews-controls { width: 100%; }
  .pnn-row { grid-template-columns: 24px 60px 1fr 38px; }
}
@media (max-width: 480px) {
  .profile-left { flex-direction: column; align-items: center; text-align: center; }
  .profile-location { justify-content: center; }
  .review-card-top { flex-direction: column; }
  .kpi-card { flex-direction: column; gap: 12px; }
}
