/* =========================
   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: 20px;
}
.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); }

/* ── PLAN + TOOLS ROW ── */
.pf-plan-tools-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.pf-plan-tools-row > .card {
  display: flex;
  flex-direction: column;
}

@media (max-width: 900px) {
  .pf-plan-tools-row { grid-template-columns: 1fr; }
}

/* ── TOOLS CARD ── */
.pf-tool-list { display: flex; flex-direction: column; gap: 14px; }

.pf-tool-row {
  display: grid;
  grid-template-columns: 160px 1fr 180px;
  align-items: center;
  gap: 16px;
}

.pf-tool-left {
  display: flex; align-items: center; gap: 10px;
}
.pf-tool-icon { font-size: 1.1rem; flex-shrink: 0; }
.pf-tool-name {
  font-size: 0.84rem; font-weight: 700; color: #c3d5e8;
}

.pf-tool-bar-wrap {
  height: 8px; background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}
/* Colour stops: red → orange → green */
.pf-tool-bar-fill {
  height: 100%; border-radius: 4px;
  transition: width 0.6s ease;
  background: linear-gradient(90deg,
    #ef4444 0%,
    #f59e0b 45%,
    #10b981 100%
  );
  background-size: 200% 100%;
}
/* Shift background-position so the visible colour matches the fill width */
.pf-tool-bar-fill { background-position: right center; }
.pf-tool-bar-empty { height: 100%; border-radius: 4px; }

.pf-tool-right {
  display: flex; align-items: center; gap: 4px; flex-shrink: 0;
}
.pf-tool-level {
  font-size: 0.75rem; font-weight: 700; color: #c3d5e8;
}
.pf-tool-dot { font-size: 0.72rem; color: rgba(148,163,184,0.4); }
.pf-tool-sub { font-size: 0.72rem; font-weight: 600; }

/* Sublabel colours */
.pf-tool-sub-muted    { color: rgba(148,163,184,0.55); }
.pf-tool-sub-building { color: #f59e0b; }
.pf-tool-sub-strong   { color: #6AA59C; }
.pf-tool-sub-advance  { color: #10b981; }

@media (max-width: 768px) {
  .pf-tool-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .pf-tool-right { margin-top: 2px; }
}

/* ── DAY JOURNEY GRID ── */
.pf-day-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.pf-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 88px;
  padding: 10px 8px 9px;
  border-radius: 12px;
  border: 1px solid rgba(148,163,184,0.10);
  background: rgba(255,255,255,0.03);
  cursor: default;
  transition: transform 0.15s;
  gap: 3px;
}
.pf-day-pill:hover { transform: translateY(-2px); }

.pf-day-num {
  font-family: 'Space Mono', monospace;
  font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(148,163,184,0.6);
  text-transform: uppercase;
}
.pf-day-concept {
  font-size: 0.68rem; font-weight: 600;
  color: #c3d5e8; text-align: center; line-height: 1.3;
}
.pf-day-score {
  font-family: 'Space Mono', monospace;
  font-size: 0.75rem; font-weight: 700; margin-top: 2px;
}

/* Day states */
.pf-day-good {
  border-color: rgba(16,185,129,0.3);
  background: rgba(16,185,129,0.06);
}
.pf-day-good .pf-day-score { color: #10b981; }

.pf-day-ok {
  border-color: rgba(245,158,11,0.3);
  background: rgba(245,158,11,0.06);
}
.pf-day-ok .pf-day-score { color: #f59e0b; }

.pf-day-low {
  border-color: rgba(239,68,68,0.25);
  background: rgba(239,68,68,0.05);
}
.pf-day-low .pf-day-score { color: #ef4444; }

.pf-day-current {
  border-color: rgba(106,165,156,0.5);
  background: rgba(106,165,156,0.08);
  box-shadow: 0 0 14px rgba(106,165,156,0.15);
}
.pf-day-current .pf-day-score { color: #6AA59C; }

.pf-day-upcoming {
  opacity: 0.45;
}
.pf-day-upcoming .pf-day-score { color: rgba(148,163,184,0.6); }

.pf-day-current-label {
  font-size: 0.7rem; color: rgba(148,163,184,0.8);
  margin-top: 4px;
}

/* ── SUBSCRIPTION ROWS ── */
.pf-sub-row {
  display: flex; align-items: center; gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(148,163,184,0.07);
}
.pf-sub-row:last-of-type { border-bottom: none; }
.pf-sub-key {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: rgba(148,163,184,0.6);
  min-width: 60px;
}
.pf-sub-val { font-size: 0.84rem; font-weight: 600; color: #c3d5e8; }
.pf-manage-btn { margin-top: 0 !important; }

/* ── PLAN CARD ── */
.pf-plan-tool-pill {
  display: inline-flex; align-items: center;
  background: rgba(106,165,156,0.1); border: 1px solid rgba(106,165,156,0.22);
  border-radius: 999px; padding: 3px 10px;
  font-size: 0.68rem; font-weight: 700; color: #6AA59C;
  letter-spacing: 0.04em;
}

.pf-rebuild-btn {
  background: rgba(245,158,11,0.08);
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem; font-weight: 700;
  color: #f59e0b;
  font-family: 'Sora', sans-serif;
  padding: 6px 16px;
  transition: all 0.15s;
  letter-spacing: 0.02em;
  line-height: 1.4;
}
.pf-rebuild-btn:hover {
  background: rgba(245,158,11,0.15);
  border-color: rgba(245,158,11,0.5);
}

/* ── REBUILD MODAL ── */
.prf-modal-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,0.65);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(3px);
}
.prf-modal-box {
  background: #0f1929;
  border: 1px solid rgba(245,158,11,0.3);
  border-radius: 16px;
  padding: 32px 36px;
  max-width: 420px; width: 90%;
  box-shadow: 0 0 40px rgba(0,0,0,0.6), 0 0 0 1px rgba(245,158,11,0.1);
}
.prf-modal-title {
  font-size: 1.1rem; font-weight: 800;
  color: #f59e0b; margin-bottom: 14px;
}
.prf-modal-body {
  font-size: 0.84rem; color: rgba(148,163,184,0.85);
  line-height: 1.6; margin-bottom: 24px;
}
.prf-modal-actions {
  display: flex; gap: 12px; justify-content: flex-end;
}
.prf-modal-btn-cancel {
  padding: 9px 22px; border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.2);
  background: rgba(148,163,184,0.06);
  color: rgba(148,163,184,0.8);
  font-family: 'Sora', sans-serif; font-size: 0.82rem;
  font-weight: 600; cursor: pointer; transition: all 0.15s;
}
.prf-modal-btn-cancel:hover { background: rgba(148,163,184,0.12); }
.prf-modal-btn-confirm {
  padding: 9px 22px; border-radius: 999px;
  border: 1px solid rgba(239,68,68,0.4);
  background: rgba(239,68,68,0.1);
  color: #ef4444;
  font-family: 'Sora', sans-serif; font-size: 0.82rem;
  font-weight: 700; cursor: pointer; transition: all 0.15s;
}
.prf-modal-btn-confirm:hover { background: rgba(239,68,68,0.18); }
.pf-rebuild-msg {
  font-size: 0.72rem; color: #f59e0b;
  margin-top: 4px; width: 100%;
}

/* hide journey card when empty */
.pf-journey-card:empty { display: none; }
.pf-journey-card:has(> :empty) { display: none; }

/* ── Phase pips (plan card) ── */
.pf-phase-pips {
  display: flex;
  gap: 5px;
  align-items: center;
}

.pf-phase-pip {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1px solid var(--border, rgba(255,255,255,0.12));
  background: rgba(255,255,255,0.05);
  font-size: 10px;
  font-weight: 700;
  color: rgba(148,163,184,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.pf-phase-pip.pf-phase-pip-here {
  background: rgba(106,165,156,0.15);
  border-color: rgba(106,165,156,0.4);
  color: #6AA59C;
}

.pf-coach-link {
  display: inline-flex; align-items: center;
  font-size: 0.78rem; font-weight: 700;
  color: #6AA59C; text-decoration: none;
  border: 1px solid rgba(106,165,156,0.3);
  padding: 6px 16px; border-radius: 999px;
  line-height: 1.4;
  transition: all 0.15s;
}
.pf-coach-link:hover { background: rgba(106,165,156,0.08); }

/* ── 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; }
  .pf-day-pill { width: 76px; }
}

/* ── Tools card: next session footer ── */
.pf-tool-next-footer {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.pf-next-label {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: rgba(200,205,220,0.4);
  flex-shrink: 0;
}
.pf-next-val {
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(200,205,220,0.8);
  flex: 1;
}
.pf-next-go {
  font-size: 0.78rem;
  font-weight: 700;
  color: #6AA59C;
  text-decoration: none;
  flex-shrink: 0;
}
.pf-next-go:hover { text-decoration: underline; }

