/* Experimental shell navigation helpers (loaded only when shell enabled by JS; safe default) */
.sh-shell-loading{position:sticky;top:8px;z-index:50;margin:8px 0;padding:10px 14px;border-radius:10px;background:#f4f7f5;color:#174d39;font:600 14px/1.4 "DM Sans",system-ui,sans-serif;border:1px solid #d9e6df}

/* ==== Instant dashboard tab switching (see js/sh-page-motion.js) ==================================
   <html data-sh-role="x"> is stamped in <head> before first paint from the remembered role, so ONLY that
   role's sidebar + content are ever painted. Nothing is hidden/faded/animated on normal navigation. */
html[data-sh-role="student"]   [data-role="landlord"],html[data-sh-role="student"]   [data-role="agent"],html[data-sh-role="student"]   [data-role="organiser"],
html[data-sh-role="landlord"]  [data-role="student"],html[data-sh-role="landlord"]  [data-role="agent"],html[data-sh-role="landlord"]  [data-role="organiser"],
html[data-sh-role="agent"]     [data-role="student"],html[data-sh-role="agent"]     [data-role="landlord"],html[data-sh-role="agent"]     [data-role="organiser"],
html[data-sh-role="organiser"] [data-role="student"],html[data-sh-role="organiser"] [data-role="landlord"],html[data-sh-role="organiser"] [data-role="agent"]{display:none!important}
html[data-sh-role="student"]   aside[data-role="student"],  html[data-sh-role="landlord"] aside[data-role="landlord"],
html[data-sh-role="agent"]     aside[data-role="agent"],    html[data-sh-role="organiser"] aside[data-role="organiser"]{display:flex!important}
html[data-sh-role="student"]   section[data-role="student"],html[data-sh-role="landlord"] section[data-role="landlord"],
html[data-sh-role="agent"]     section[data-role="agent"],  html[data-sh-role="organiser"] section[data-role="organiser"]{display:block!important}

/* Role unknown (first load of a tab, nothing remembered): keep the space, paint nothing wrong, no page blackout. */
html.sh-role-pending:not([data-sh-role]) [data-role]{visibility:hidden}

/* Cross-page transition (Chrome/Edge/Safari 18.2+): the old page stays on screen until the new one can paint,
   the header + side menu stay perfectly still, only the content softly cross-fades. Ignored elsewhere. */
@media (prefers-reduced-motion:no-preference){
  @view-transition{navigation:auto}
  [id^="ie3f"]{view-transition-name:sh-header}
  aside[data-role]{view-transition-name:sh-side}
  ::view-transition-group(sh-header),::view-transition-group(sh-side){animation-duration:0s}
  ::view-transition-old(root),::view-transition-new(root){animation-duration:0s}
}
