/* Portal sidebar, shared by every page (including the Engagement Dashboard, which has its own styles).
   Styled like Veluma's rail: paper background, muted labels, a magenta pill for the current page.
   A fixed left rail on wide screens; on phones, a top bar with a menu button that slides the rail in. */
:root { --rail: 244px; }
.pnav { position: fixed; z-index: 30; top: 0; bottom: 0; left: 0; width: var(--rail); background: #FFFCF6; color: #1C0264; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 14px; box-shadow: 1px 0 0 rgba(13,27,61,.08); }
body.has-pnav { margin: 0; padding-left: var(--rail); }
.pnav-in { height: 100%; display: flex; flex-direction: column; gap: 6px; padding: 18px 12px 14px; overflow-y: auto; }
.pnav-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 6px 16px; border-bottom: 1px solid rgba(13,27,61,.08); margin-bottom: 6px; }
.pnav-brand { display: inline-flex; align-items: center; gap: 10px; color: #1C0264; text-decoration: none; font-family: "Fraunces", Georgia, serif; font-style: italic; font-weight: 700; font-size: 1.32rem; line-height: 1.05; letter-spacing: -.02em; white-space: nowrap; }
.pnav-brand > span { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pnav-brand em { font-style: italic; color: #FE019A; }
.pnav-brand i { width: 40px; height: 40px; display: inline-block; flex: none; }
.pnav-brand small { font-family: ui-monospace, Menlo, monospace; font-style: normal; font-size: .66rem; font-weight: 700; letter-spacing: .08em; color: #FE019A; border: 1px solid currentColor; border-radius: 6px; padding: 1px 5px; }
.pnav-brand i svg { display: block; width: 100%; height: 100%; }
.pnav-toggle { display: none; font: inherit; color: #1C0264; background: #E8E5F2; border: 0; border-radius: 8px; padding: 7px 10px; cursor: pointer; }
.pnav-links { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.pnav-links a { display: flex; align-items: center; gap: 11px; color: #4A5168; text-decoration: none; padding: 9px 12px; border-radius: 8px; white-space: nowrap; font-weight: 500; }
.pnav-links a svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.pnav-links a:hover { color: #1C0264; background: #FCE4F0; }
.pnav-links a[aria-current="page"] { color: #fff; background: #FE019A; font-weight: 600; }
.pnav-links a[aria-current="page"]:hover { background: #E0017F; }
.pnav-links a[aria-current="page"] svg { opacity: 1; }
.pnav-links .sep { height: 1px; background: rgba(13,27,61,.08); margin: 8px 6px; }
.pnav-links a:focus-visible, .pnav-me:focus-visible, .pnav-out:focus-visible, .pnav-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(254,1,154,.25); }
.pnav-foot { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid rgba(13,27,61,.08); }
.pnav-me { display: flex; align-items: center; gap: 10px; color: #1C0264; text-decoration: none; padding: 6px 8px; border-radius: 12px; min-width: 0; }
.pnav-me:hover, .pnav-me[aria-current="page"] { background: #E8E5F2; }
.pnav-me .av { width: 36px; height: 36px; font-size: .8rem; border: 2px solid #FE019A; }
.pnav-me .nm { display: flex; flex-direction: column; min-width: 0; font-weight: 600; line-height: 1.2; }
.pnav-me .nm small { font-weight: 400; font-size: .76rem; color: #8A91A8; }
.pnav-out { font: inherit; text-align: left; color: #4A5168; background: none; border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; }
.pnav-out:hover { color: #1C0264; background: #E8E5F2; }
.pnav-scrim { display: none; }

@media (max-width: 900px) {
  body.has-pnav { padding-left: 0; padding-top: 56px; }
  .pnav { bottom: auto; right: 0; width: auto; height: 56px; box-shadow: 0 1px 0 rgba(13,27,61,.08); }
  .pnav-in { padding: 0 14px; overflow: visible; }
  .pnav-top { height: 56px; padding: 0; border-bottom: 0; margin-bottom: 0; }
  .pnav-brand { font-size: 1.2rem; }
  .pnav-brand i { width: 34px; height: 34px; }
  .pnav-brand > span { flex-direction: row; align-items: center; gap: 8px; }
  .pnav-toggle { display: inline-flex; }
  .pnav-links, .pnav-foot { display: none; }
  .pnav.open { bottom: 0; height: auto; }
  .pnav.open .pnav-in { overflow-y: auto; padding-bottom: 14px; }
  .pnav.open .pnav-links, .pnav.open .pnav-foot { display: flex; }
}

/* Avatar: a photo, or initials on a colored disc */
.av { flex: none; display: inline-grid; place-items: center; border-radius: 50%; overflow: hidden; color: #fff; font-weight: 700; letter-spacing: .02em; background: #1C0264; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.av img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; display: block; }
