/* =========================
   NAV — mobile fit + avatar safe
   ========================= */

/* Base nav row should spread out */
.navbar,
.navbar-inner,
.nav-links {
  display: flex !important;
  align-items: center !important;
}

/* The main nav container: space-between so it doesn't squash left */
.navbar-inner,
.nav-links {
  justify-content: space-between !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;          /* ✅ allows children to shrink */
}

/* If your links are in a left group, make it wrap/scroll instead of crushing */
.nav-left {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  min-width: 0 !important;
  flex: 1 1 auto !important;
}

/* User cluster (avatar + email) */
.nav-user {
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  min-width: 0 !important;
  flex: 0 0 auto !important;
}

/* Avatar: never clipped */
.nav-avatar {
  width: 34px !important;
  height: 34px !important;
  border-radius: 999px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 1 !important;
  flex: 0 0 34px !important;        /* ✅ fixed size */
}

/* Email: allow shrink + ellipsis on desktop */
.nav-email-long {
  min-width: 0 !important;
  max-width: 220px;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* ✅ Mobile: hide email completely so avatar always fits */
@media (max-width: 768px) {
  .nav-email-long {
    display: none !important;
  }

  /* make sure nav has enough padding so avatar doesn't touch edges */
  .navbar,
  .navbar-inner,
  .nav-links {
    padding-left: 10px !important;
    padding-right: 10px !important;
  }
}


/* ================================================
   BAMPAA — Profile Page Styles
   assets/profile.css
   ================================================ */

.pf-shell {
  max-width: 1100px;
  margin: 0 auto;
  padding: 28px 24px 60px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ── HERO CARD ── */
.pf-hero-card {
  padding: 28px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, rgba(18,26,43,0.96), rgba(12,20,35,0.92)) !important;
  position: relative;
  overflow: hidden;
}
.pf-hero-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: radial-gradient(700px 400px at 0% 50%, rgba(106,165,156,0.08), transparent 55%);
  pointer-events: none;
}

.pf-hero-left {
  display: flex;
  align-items: center;
  gap: 20px;
  flex: 1;
  min-width: 0;
}
.pf-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  flex-shrink: 0;
}

/* Avatar */
.pf-avatar-wrap { position: relative; flex-shrink: 0; }
.pf-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #6AA59C, #4B7F76);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Space Mono', monospace;
  font-size: 1.6rem; font-weight: 700; color: #fff;
  box-shadow: 0 0 24px rgba(106,165,156,0.4);
}
.pf-avatar-ring {
  position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid rgba(106,165,156,0.35);
}

.pf-hero-info { flex: 1; min-width: 0; }
.pf-hero-name  { font-size: 1.4rem; font-weight: 800; line-height: 1.2; margin-bottom: 4px; color: #e6e9ee; }
.pf-hero-email { font-size: 0.76rem; color: rgba(148,163,184,0.8); margin-bottom: 10px; }
.pf-hero-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

.pf-level-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(232,147,90,0.12); border: 1px solid rgba(232,147,90,0.25);
  border-radius: 999px; padding: 4px 12px;
  font-size: 0.68rem; font-weight: 700; color: #E8935A;
  letter-spacing: 0.05em;
}
.pf-streak-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.2);
  border-radius: 999px; padding: 4px 12px;
  font-size: 0.68rem; font-weight: 700; color: #f59e0b;
}
.pf-solved-badge {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(106,165,156,0.1); border: 1px solid rgba(106,165,156,0.2);
  border-radius: 999px; padding: 4px 12px;
  font-size: 0.68rem; font-weight: 700; color: #6AA59C;
}

/* XP bar */
.pf-xp-wrap { width: 200px; }
.pf-xp-labels { display: flex; justify-content: space-between; margin-bottom: 5px; }
.pf-xp-label-left, .pf-xp-label-right { font-size: 0.65rem; color: rgba(148,163,184,0.7); }
.pf-xp-bar {
  height: 7px; background: rgba(255,255,255,0.07);
  border-radius: 4px; overflow: hidden;
}
.pf-xp-val {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem; color: #6AA59C; font-weight: 700;
  text-align: right; margin-top: 5px;
}

/* ── STATS ROW ── */
.pf-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.pf-stat-card {
  padding: 18px 20px;
  text-align: center;
}
.pf-stat-icon  { font-size: 1.4rem; margin-bottom: 6px; }
.pf-stat-val   { font-family: 'Space Mono', monospace; font-size: 1.8rem; font-weight: 700; line-height: 1; margin-bottom: 3px; color: #e6e9ee; }
.pf-stat-label { font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(148,163,184,0.7); }
.pf-green  { color: #10b981 !important; }
.pf-brand  { color: #6AA59C  !important; }
.pf-yellow { color: #f59e0b  !important; }
.pf-orange { color: #E8935A  !important; }

/* ── SECTION CARD ── */
.pf-section-card { padding: 20px 24px; }

.pf-section-label {
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: rgba(148,163,184,0.7);
  margin-bottom: 14px;
}

/* ── HEATMAP ── */
.pf-heatmap-header {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 14px;
}
.pf-card-title { font-size: 0.88rem; font-weight: 700; color: #e6e9ee; }
.pf-card-sub   { font-size: 0.72rem; color: rgba(148,163,184,0.7); margin-top: 3px; }
.pf-heatmap-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.72rem; color: #6AA59C; font-weight: 700;
}

.hm-grid { display: flex; gap: 3px; }
.hm-week { display: flex; flex-direction: column; gap: 3px; }
.hm-cell {
  width: 13px; height: 13px; border-radius: 3px;
  background: rgba(255,255,255,0.05);
  cursor: pointer; transition: transform 0.1s, opacity 0.1s;
  flex-shrink: 0;
}
.hm-cell:hover { transform: scale(1.35); opacity: 0.9; }
.hm-l1 { background: rgba(106,165,156,0.25); }
.hm-l2 { background: rgba(106,165,156,0.50); }
.hm-l3 { background: rgba(106,165,156,0.75); }
.hm-l4 { background: #6AA59C; box-shadow: 0 0 6px rgba(106,165,156,0.4); }

.pf-heatmap-legend {
  display: flex; align-items: center; gap: 5px;
  justify-content: flex-end; margin-top: 10px;
}
.pf-legend-label { font-size: 0.62rem; color: rgba(148,163,184,0.6); }

/* ── TWO COL ── */
.pf-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* ── CATEGORY BARS ── */
.pf-cat-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 10px;
}
.pf-cat-name {
  font-size: 0.78rem; font-weight: 600; color: #c3d5e8;
  min-width: 120px; flex-shrink: 0;
}
.pf-cat-bar-wrap {
  flex: 1; height: 7px; background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
.pf-cat-count {
  font-family: 'Space Mono', monospace;
  font-size: 0.65rem; color: rgba(148,163,184,0.7);
  min-width: 38px; text-align: right;
}

/* Live count */
.pf-live-count { display: flex; align-items: center; gap: 10px; }
.pf-live-num {
  font-family: 'Space Mono', monospace;
  font-size: 1.5rem; font-weight: 700; color: #6AA59C;
}
.pf-live-label { font-size: 0.8rem; color: rgba(148,163,184,0.8); }

/* ── ACTIVITY FEED ── */
.pf-feed-list { display: flex; flex-direction: column; gap: 8px; }
.pf-feed-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(148,163,184,0.08);
  transition: background 0.18s;
}
.pf-feed-item:hover { background: rgba(106,165,156,0.04); }
.pf-feed-icon {
  width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; flex-shrink: 0;
}
.pf-feed-icon-correct { background: rgba(16,185,129,0.12); }
.pf-feed-icon-wrong   { background: rgba(239,68,68,0.10); }
.pf-feed-main { flex: 1; min-width: 0; }
.pf-feed-title {
  font-size: 0.8rem; font-weight: 600; color: #c3d5e8;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pf-feed-meta { font-size: 0.68rem; color: rgba(148,163,184,0.7); margin-top: 2px; }
.pf-tag {
  font-size: 0.62rem; font-weight: 700; padding: 2px 8px;
  border-radius: 6px; flex-shrink: 0; letter-spacing: 0.05em;
}
.pf-tag-sql  { background: rgba(106,165,156,0.12); color: #6AA59C; }
.pf-tag-py   { background: rgba(232,147,90,0.10);  color: #E8935A; }
.pf-tag-live { background: rgba(59,130,246,0.10);  color: #60a5fa; }
.pf-tag-tp   { background: rgba(245,158,11,0.10);  color: #f59e0b; }

/* ── SETTINGS ── */
.pf-settings-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.pf-name-input {
  width: 160px !important;
  padding: 9px 14px !important;
}
.pf-btn-save {
  padding: 9px 22px; border-radius: 999px; border: none;
  background: linear-gradient(135deg, #6AA59C, #4B7F76);
  color: #fff; font-family: 'Sora', sans-serif;
  font-size: 0.82rem; font-weight: 700; cursor: pointer;
  box-shadow: 0 0 14px rgba(106,165,156,0.35);
  transition: all 0.18s;
}
.pf-btn-save:hover { box-shadow: 0 0 22px rgba(106,165,156,0.55); transform: translateY(-1px); }
.pf-save-msg  { font-size: 0.75rem; color: #6AA59C; font-weight: 600; }
.pf-btn-logout {
  padding: 9px 22px; border-radius: 999px;
  border: 1px solid rgba(239,68,68,0.3);
  background: rgba(239,68,68,0.08); color: #ef4444;
  font-family: 'Sora', sans-serif; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; transition: all 0.18s;
}
.pf-btn-logout:hover { background: rgba(239,68,68,0.14); }

/* ── MOBILE ── */
@media (max-width: 768px) {
  .pf-shell { padding: 14px 12px 48px; gap: 14px; }

  .pf-hero-card { flex-direction: column; align-items: flex-start; padding: 20px; }
  .pf-hero-right { align-items: flex-start; width: 100%; }
  .pf-xp-wrap { width: 100%; }

  .pf-stats-row { grid-template-columns: repeat(2, 1fr); }
  .pf-two-col   { grid-template-columns: 1fr; }

  .pf-name-input { width: 100% !important; }
  .pf-settings-row { flex-direction: column; align-items: stretch; }
  .pf-btn-save, .pf-btn-logout { width: 100%; text-align: center; }

  .hm-cell { width: 11px; height: 11px; }
}