/* Sfera CRM — persistent icon rail. The app's existing routes and permissions
   remain owned by crm.js and the modules that populate #app-navigation. */
:root {
  --sfera-rail-width:72px;
  --sfera-rail-expanded:252px;
  --sfera-rail-ink:#EAF2FF;
  --sfera-rail-muted:#B3C5E1;
}

#signed-in #app-navigation-drawer.app-drawer {
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:0!important;
  padding:0!important;
  border-right:1px solid rgba(145,181,241,.18)!important;
  border-radius:0!important;
  background:#132652!important;
  box-shadow:8px 0 32px rgba(13,30,66,.09)!important;
  color:var(--sfera-rail-ink)!important;
  overflow:hidden!important;
}

#signed-in #app-navigation-drawer .portal-sidebar__header {
  box-sizing:border-box;
  display:flex;
  width:100%;
  min-height:82px;
  flex:0 0 82px;
  align-items:center;
  justify-content:flex-start;
  margin:0!important;
  padding:12px 11px!important;
  border-bottom:1px solid rgba(177,204,249,.12);
}

#signed-in .sfera-nav-brand {
  box-sizing:border-box;
  display:flex;
  min-width:0;
  width:100%;
  align-items:center;
  gap:11px;
  overflow:hidden;
  color:#FFF!important;
  text-decoration:none!important;
}
#signed-in .sfera-nav-brand__mark {
  display:grid;
  flex:0 0 48px;
  width:48px;
  height:48px;
  place-items:center;
  border:1px solid rgba(255,255,255,.18);
  border-radius:15px;
  background:linear-gradient(145deg,#FFF,#E5EEFC);
  box-shadow:0 6px 18px rgba(6,13,31,.17),inset 0 1px 0 rgba(255,255,255,.94);
}
#signed-in .sfera-nav-brand__mark img{width:34px;height:34px;object-fit:contain}
#signed-in .sfera-nav-brand__name {
  display:flex;
  min-width:0;
  flex-direction:column;
  opacity:0;
  white-space:nowrap;
  transform:translateX(-4px);
  transition:opacity .16s ease,transform .16s ease;
}
#signed-in .sfera-nav-brand__name strong{font:700 21px/1.1 Poppins,sans-serif;letter-spacing:-.04em}
#signed-in .sfera-nav-brand__name small{margin-top:5px;color:#9FC5F7;font:700 10px/1 "Open Sans",sans-serif;letter-spacing:.28em}
#signed-in #app-navigation-drawer .portal-sidebar__close{display:none!important}

#signed-in #app-navigation.app-navigation {
  box-sizing:border-box;
  display:flex!important;
  flex:1 1 auto;
  flex-direction:column;
  /* Legacy portal CSS enables wrapping: on a narrow rail that silently moves
     the final admin entries into an invisible second column. */
  flex-wrap:nowrap!important;
  min-height:0;
  gap:3px!important;
  margin:0!important;
  padding:13px 9px 15px!important;
  overflow-x:hidden;
  overflow-y:auto;
  scrollbar-width:thin;
  scrollbar-color:rgba(190,213,255,.26) transparent;
  overscroll-behavior:contain;
}
#signed-in #app-navigation::-webkit-scrollbar{width:4px}
#signed-in #app-navigation::-webkit-scrollbar-thumb{border-radius:6px;background:rgba(190,213,255,.27)}

#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav] {
  position:relative;
  box-sizing:border-box;
  display:flex;
  width:100%!important;
  min-width:0;
  height:44px;
  min-height:44px!important;
  flex:0 0 44px;
  align-items:center;
  justify-content:flex-start;
  gap:14px!important;
  margin:0!important;
  padding:0 14px!important;
  border:1px solid transparent!important;
  border-radius:12px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--sfera-rail-muted)!important;
  font:600 13px/1.2 "Open Sans",sans-serif!important;
  letter-spacing:0!important;
  text-decoration:none!important;
  text-transform:none!important;
  white-space:nowrap;
  cursor:pointer;
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
#signed-in #app-navigation.app-navigation > :is(a,button)[hidden],
#signed-in #app-navigation.app-navigation > :is(a,button)[aria-hidden="true"],
#signed-in #app-navigation #legacy-crm-menu{display:none!important}
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]::before,
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]::after{display:none!important;content:none!important}
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]:is(:hover,:focus-visible){
  background:rgba(202,225,255,.105)!important;
  border-color:rgba(202,225,255,.08)!important;
  color:#FFF!important;
  outline-offset:-2px;
}
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav][aria-current="page"] {
  border-color:rgba(132,182,249,.28)!important;
  background:linear-gradient(95deg,rgba(41,122,234,.39),rgba(44,92,170,.25))!important;
  box-shadow:inset 3px 0 0 #63B4FF!important;
  color:#FFF!important;
}
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]:is([data-app-nav="projects"],[data-app-nav="support"],[data-app-nav="hub"]){
  margin-top:11px!important;
}
#signed-in .sfera-nav-icon {
  display:grid;
  flex:0 0 22px;
  width:22px;
  height:22px;
  place-items:center;
  color:inherit;
}
#signed-in .sfera-nav-icon svg{
  display:block;
  width:21px;
  height:21px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}
#signed-in .sfera-nav-label {
  display:block;
  flex:0 0 auto;
  max-width:0;
  overflow:hidden;
  opacity:0;
  visibility:hidden;
  white-space:nowrap;
  transform:translateX(-4px);
  transition:opacity .15s ease,transform .15s ease,visibility .15s ease,max-width .15s ease;
}
#signed-in #app-navigation .admin-restricted-key{display:none!important}

#signed-in .sfera-nav-footer {
  box-sizing:border-box;
  flex:0 0 69px;
  width:100%;
  padding:12px 9px!important;
  border-top:1px solid rgba(177,204,249,.13);
}
#signed-in #sfera-nav-pin {
  box-sizing:border-box;
  display:flex;
  width:100%;
  height:44px;
  align-items:center;
  gap:14px;
  margin:0;
  padding:0 14px;
  border:1px solid transparent;
  border-radius:12px;
  background:transparent;
  color:var(--sfera-rail-muted);
  box-shadow:none;
  cursor:pointer;
  font:600 12px "Open Sans",sans-serif;
  text-align:left;
}
#signed-in #sfera-nav-pin:hover,#signed-in #sfera-nav-pin:focus-visible{
  border-color:rgba(202,225,255,.1);
  background:rgba(202,225,255,.09);
  color:#FFF;
}
#signed-in #sfera-nav-pin[aria-pressed="true"]{color:#8DCCFF}
#signed-in #sfera-nav-pin svg{width:21px;height:21px;flex:0 0 21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

@media(min-width:901px) {
  #signed-in.app-shell{padding-left:var(--sfera-rail-width);transition:padding-left .2s ease}
  #signed-in.app-shell.sfera-nav-pinned{padding-left:var(--sfera-rail-expanded)}
  #signed-in .app-topbar{
    left:var(--sfera-rail-width)!important;
    right:0!important;
    justify-content:flex-end!important;
    transition:left .2s ease;
  }
  #signed-in.sfera-nav-pinned .app-topbar{left:var(--sfera-rail-expanded)!important}
  #signed-in .portal-topbar__branding,#signed-in #app-menu-toggle{display:none!important}
  #signed-in .portal-topbar__actions{margin-left:auto}
  #signed-in #app-navigation-drawer.app-drawer {
    position:fixed!important;
    z-index:520!important;
    top:0!important;
    bottom:0!important;
    left:0!important;
    right:auto!important;
    width:var(--sfera-rail-width)!important;
    max-width:none!important;
    transform:none!important;
    opacity:1!important;
    transition:width .2s cubic-bezier(.2,.72,.25,1),box-shadow .2s ease!important;
  }
  #signed-in #app-navigation-drawer:is(:hover,:focus-within),
  #signed-in.sfera-nav-pinned #app-navigation-drawer{width:var(--sfera-rail-expanded)!important}
  #signed-in #app-navigation-drawer:is(:hover,:focus-within) .sfera-nav-label,
  #signed-in.sfera-nav-pinned #app-navigation-drawer .sfera-nav-label,
  #signed-in #app-navigation-drawer:is(:hover,:focus-within) .sfera-nav-brand__name,
  #signed-in.sfera-nav-pinned #app-navigation-drawer .sfera-nav-brand__name{
    max-width:190px;
    opacity:1;
    visibility:visible;
    transform:none;
  }
  #signed-in #app-navigation-drawer:is(:hover,:focus-within) #app-navigation .admin-restricted-key,
  #signed-in.sfera-nav-pinned #app-navigation-drawer #app-navigation .admin-restricted-key{display:inline-grid!important}
  #signed-in #app-navigation-backdrop{display:none!important}
  /* The global floating action must never cover the sidebar pin control. */
  #signed-in #global-quick-actions{left:calc(var(--sfera-rail-width) + 22px)!important}
  #signed-in.sfera-nav-pinned #global-quick-actions,
  #signed-in #app-navigation-drawer:is(:hover,:focus-within) ~ #app-content #global-quick-actions{
    left:calc(var(--sfera-rail-expanded) + 22px)!important;
  }
}

/* Keep the complete navigation comfortably in view on ordinary laptop screens.
   Shorter viewports still scroll vertically; links never wrap into columns. */
@media(min-width:901px) and (max-height:1199px) {
  #signed-in #app-navigation-drawer .portal-sidebar__header{min-height:70px;flex-basis:70px;padding:9px 11px!important}
  #signed-in #app-navigation.app-navigation{gap:2px!important;padding:7px 9px 9px!important}
  #signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]{height:36px;min-height:36px!important;flex-basis:36px;border-radius:10px!important}
  #signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]:is([data-app-nav="projects"],[data-app-nav="support"],[data-app-nav="hub"]){margin-top:7px!important}
  #signed-in .sfera-nav-footer{flex-basis:56px;padding:6px 9px!important}
}
@media(min-width:901px) and (max-height:940px) {
  #signed-in #app-navigation-drawer .portal-sidebar__header{min-height:62px;flex-basis:62px;padding:7px 11px!important}
  #signed-in .sfera-nav-brand__mark{width:44px;height:44px;flex-basis:44px}
  #signed-in .sfera-nav-brand__mark img{width:32px;height:32px}
  #signed-in #app-navigation.app-navigation{gap:2px!important;padding:7px 9px!important}
  #signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]{height:33px;min-height:33px!important;flex-basis:33px}
  #signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]:is([data-app-nav="projects"],[data-app-nav="support"],[data-app-nav="hub"]){margin-top:6px!important}
  #signed-in .sfera-nav-footer{flex-basis:52px;padding:4px 9px!important}
}

@media(max-width:900px) {
  #signed-in.app-shell,#signed-in.app-shell.sfera-nav-pinned{padding-left:0!important}
  #signed-in .app-topbar{left:0!important}
  #signed-in .portal-topbar__branding,#signed-in #app-menu-toggle{display:flex!important}
  #signed-in #app-navigation-drawer.app-drawer {
    position:fixed!important;
    z-index:520!important;
    top:68px!important;
    bottom:0!important;
    left:0!important;
    width:min(310px,86vw)!important;
    max-width:none!important;
    opacity:1!important;
    transform:translateX(-105%)!important;
    transition:transform .2s cubic-bezier(.2,.72,.25,1)!important;
  }
  #signed-in #app-navigation-drawer.app-drawer.is-open{transform:translateX(0)!important}
  #signed-in #app-navigation-backdrop:not([hidden]){
    display:block!important;
    position:fixed;
    z-index:510!important;
    background:rgba(8,18,42,.48)!important;
  }
  #signed-in #app-navigation-drawer .portal-sidebar__header{min-height:76px;flex-basis:76px;gap:8px}
  #signed-in #app-navigation-drawer .portal-sidebar__close{
    display:grid!important;
    flex:0 0 40px;
    width:40px;
    height:40px;
    place-items:center;
    margin-left:auto;
    border:1px solid rgba(230,241,255,.15);
    border-radius:11px;
    background:rgba(255,255,255,.07);
    color:#DCEBFF;
    font-size:25px;
  }
  #signed-in .sfera-nav-brand__name,#signed-in .sfera-nav-label{max-width:190px;opacity:1;visibility:visible;transform:none}
  #signed-in #app-navigation .admin-restricted-key{display:inline-grid!important}
  #signed-in .sfera-nav-footer{display:none!important}
  #signed-in #global-quick-actions{left:22px!important}
  /* Global floating widgets must not obscure navigation targets on mobile. */
  body.app-drawer-open #global-quick-actions,
  body.app-drawer-open #firestore-usage-widget{visibility:hidden!important;pointer-events:none!important}
  body.app-drawer-open #app-menu-toggle{opacity:0!important;pointer-events:none!important}
}

@media(prefers-reduced-motion:reduce){
  #signed-in.app-shell,#signed-in .app-topbar,#signed-in #app-navigation-drawer.app-drawer,
  #signed-in .sfera-nav-label,#signed-in .sfera-nav-brand__name{transition:none!important}
}

/* 1.111.1 — compact Sfera symbol, responsive sidebar movement */
#signed-in .sfera-nav-brand__mark{background:transparent!important;border:0!important;box-shadow:none!important;border-radius:50%!important}
#signed-in .sfera-nav-brand__mark svg{display:block;width:34px;height:34px;overflow:visible}
#signed-in .sfera-nav-brand__name,#signed-in .sfera-nav-label{transition:opacity .095s ease-out,transform .095s ease-out,visibility .095s ease-out,max-width .095s ease-out!important;transition-delay:0s!important}
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav]{transition:background-color .095s ease-out,color .095s ease-out,border-color .095s ease-out!important}
@media(min-width:901px){
 #signed-in.app-shell{transition:padding-left .11s ease-out!important}
 #signed-in .app-topbar{transition:left .11s ease-out!important}
 #signed-in #app-navigation-drawer.app-drawer{transition:width .11s ease-out!important;will-change:width}
}
@media(prefers-reduced-motion:reduce){#signed-in #app-navigation-drawer.app-drawer,#signed-in .sfera-nav-brand__name,#signed-in .sfera-nav-label{transition:none!important}}

/* 1.111.2 — Basalt-like reveal: fixed panel width, animated clip, no layout thrash. */
#signed-in .sfera-nav-brand__mark img{
 display:block!important;width:32px!important;height:32px!important;object-fit:contain!important;
 filter:brightness(0) invert(1)!important;-webkit-filter:brightness(0) invert(1)!important;opacity:1!important
}
@media(min-width:901px){
 #signed-in #app-navigation-drawer.app-drawer,
 #signed-in #app-navigation-drawer:is(:hover,:focus-within),
 #signed-in.sfera-nav-pinned #app-navigation-drawer{
  width:var(--sfera-rail-expanded)!important;max-width:none!important;
  transform:none!important;will-change:clip-path!important;
  transition:clip-path .19s cubic-bezier(.2,.8,.2,1)!important
 }
 #signed-in:not(.sfera-nav-pinned) #app-navigation-drawer.app-drawer{
  clip-path:inset(0 calc(var(--sfera-rail-expanded) - var(--sfera-rail-width)) 0 0)
 }
 #signed-in #app-navigation-drawer:is(:hover,:focus-within),
 #signed-in.sfera-nav-pinned #app-navigation-drawer{
  clip-path:inset(0)!important
 }
 #signed-in .sfera-nav-label,
 #signed-in .sfera-nav-brand__name{
  max-width:190px!important;visibility:visible!important;
  opacity:0;transform:translateX(-6px)!important;
  transition:opacity .16s ease-out,transform .18s ease-out!important
 }
 #signed-in #app-navigation-drawer:is(:hover,:focus-within) .sfera-nav-label,
 #signed-in.sfera-nav-pinned #app-navigation-drawer .sfera-nav-label,
 #signed-in #app-navigation-drawer:is(:hover,:focus-within) .sfera-nav-brand__name,
 #signed-in.sfera-nav-pinned #app-navigation-drawer .sfera-nav-brand__name{
  opacity:1!important;transform:none!important
 }
}
@media(prefers-reduced-motion:reduce){
 #signed-in #app-navigation-drawer.app-drawer,
 #signed-in .sfera-nav-label,
 #signed-in .sfera-nav-brand__name{transition:none!important;will-change:auto!important}
}

/* 1.111.4 — a single full-height navy drawer overlays the topbar on phones. */
@media(max-width:900px){
 #signed-in.app-shell #app-navigation-drawer.app-drawer{
  position:fixed!important;inset:0 auto 0 0!important;top:0!important;bottom:0!important;
  width:min(310px,86vw)!important;max-width:none!important;
  height:100vh!important;height:100dvh!important;z-index:1020!important;
  background:#132652!important;color:#fff!important;
  border-right:1px solid rgba(195,219,255,.2)!important;
  overflow:hidden!important;overscroll-behavior:contain!important;
  box-shadow:16px 0 38px rgba(9,20,46,.18)!important
 }
 #signed-in.app-shell #app-navigation-backdrop:not([hidden]){
  position:fixed!important;inset:0!important;top:0!important;z-index:1010!important;
  background:rgba(6,18,40,.58)!important
 }
 #signed-in.app-shell #app-navigation-drawer .portal-sidebar__header{
  box-sizing:border-box!important;min-height:72px!important;height:72px!important;flex:0 0 72px!important;
  padding:12px 11px!important;border-bottom:1px solid rgba(211,230,255,.15)!important;
  background:#132652!important
 }
 #signed-in #app-navigation-drawer .sfera-nav-brand{flex:0 1 auto!important;min-width:0!important;width:auto!important}
 #signed-in #app-navigation-drawer .sfera-nav-brand__mark{
  background:transparent!important;box-shadow:none!important;border:0!important
 }
 #signed-in #app-navigation-drawer .portal-sidebar__close{
  display:grid!important;flex:0 0 38px!important;width:38px!important;height:38px!important;
  margin-left:auto!important;place-items:center!important;border-radius:11px!important;
  border:1px solid rgba(207,227,255,.24)!important;background:rgba(255,255,255,.08)!important;
  color:#fff!important
 }
 #signed-in #app-navigation-drawer .portal-sidebar__close:is(:hover,:focus-visible,:active){
  background:rgba(255,255,255,.17)!important;color:#fff!important
 }
 #signed-in #app-navigation-drawer #app-navigation{
  background:#132652!important;overflow-y:auto!important;overflow-x:hidden!important;
  -webkit-overflow-scrolling:touch!important;overscroll-behavior:contain!important;
  padding:10px 10px 20px!important;gap:5px!important
 }
 #signed-in #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]{
  color:#e0edff!important;-webkit-text-fill-color:currentColor!important;
  min-height:43px!important;height:auto!important;flex-basis:43px!important;
  background:transparent!important;border-color:transparent!important
 }
 #signed-in #app-navigation-drawer #app-navigation .sfera-nav-label{
  display:block!important;max-width:195px!important;opacity:1!important;visibility:visible!important;
  color:inherit!important;-webkit-text-fill-color:inherit!important;transform:none!important
 }
 #signed-in #app-navigation-drawer #app-navigation .sfera-nav-icon,
 #signed-in #app-navigation-drawer #app-navigation .sfera-nav-icon svg{
  color:inherit!important;stroke:currentColor!important;opacity:1!important
 }
 #signed-in #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav][aria-current="page"]{
  color:#fff!important;background:rgba(73,137,233,.37)!important;
  box-shadow:inset 3px 0 0 #87C8FF!important;border:1px solid rgba(151,201,255,.27)!important
 }
 #signed-in #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]:is(:hover,:focus-visible,:active){
  color:#fff!important;background:rgba(156,203,255,.16)!important
 }
 #signed-in #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav][aria-current="page"]:is(:hover,:focus-visible,:active){
  background:rgba(73,137,233,.44)!important
 }
 #signed-in #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]:active{
  transform:scale(.988)!important;transition-duration:.1s!important
 }
 /* The topbar is below the open overlay, hiding its own logo without duplicating it. */
 #signed-in .app-topbar #app-menu-toggle.portal-topbar__menu-toggle{
  display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:center!important;
  box-sizing:border-box!important;flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  margin:0!important;padding:7px!important;border-radius:11px!important;
  background:rgba(255,255,255,.075)!important;border:1px solid rgba(192,216,255,.2)!important;
  color:#e8f3ff!important;box-shadow:none!important
 }
 #signed-in .app-topbar #app-menu-toggle .portal-topbar__menu-bars{display:none!important}
 #signed-in .app-topbar #app-menu-toggle .sfera-mobile-menu-icon{
  display:block!important;flex:none!important;width:20px!important;height:20px!important;
  color:#e8f3ff!important;stroke:#e8f3ff!important;opacity:1!important
 }
 #signed-in .app-topbar #app-menu-toggle:is(:hover,:focus-visible,:active){
  background:rgba(255,255,255,.15)!important;border-color:rgba(196,224,255,.4)!important
 }
 #signed-in .app-topbar #account-menu-toggle.account-toggle{
  box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:center!important;
  flex:0 0 36px!important;width:36px!important;min-width:36px!important;max-width:36px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  padding:0!important;margin:0!important;gap:0!important;overflow:visible!important;
  background:rgba(255,255,255,.075)!important;border:1px solid rgba(192,216,255,.2)!important;
  border-radius:11px!important
 }
 #signed-in .app-topbar #account-menu-toggle .account-toggle__identity{display:none!important}
 #signed-in .app-topbar #account-menu-toggle .account-toggle__avatar{
  position:relative!important;display:block!important;flex:0 0 22px!important;
  box-sizing:border-box!important;width:22px!important;min-width:22px!important;max-width:22px!important;
  height:22px!important;min-height:22px!important;max-height:22px!important;
  padding:0!important;margin:0!important;overflow:visible!important;
  border:0!important;background:none!important;color:transparent!important;font-size:0!important
 }
 #signed-in .app-topbar #account-menu-toggle .account-toggle__avatar::after{
  content:""!important;display:block!important;position:absolute!important;inset:0!important;
  width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;
  margin:0!important;padding:0!important;transform:none!important;
  background:#e8f3ff!important;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E") center/contain no-repeat!important;
  mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3Cpath d='M4 21v-2a8 8 0 0 1 16 0v2'/%3E%3C/svg%3E") center/contain no-repeat!important
 }
}
@media(min-width:901px){
 #signed-in .app-topbar #app-menu-toggle .sfera-mobile-menu-icon{display:none!important}
}
@media(prefers-reduced-motion:reduce){
 #signed-in #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]{transition:none!important}
}

/* 1.145.5 — Mobile drawer visually matches the desktop Sfera navigation.
   Preserve the mobile offcanvas lifecycle, all real links and role visibility.
   Header/topbar's authoritative navy is #132652 (also observed in mobile UI).
   The desktop rail remains untouched. */
#signed-in #app-navigation-drawer.app-drawer{
 background:#0e2166!important;background-image:none!important
}
@media(max-width:900px){
 /* Match the existing top strip, including the scrollable navigation and the
    empty area below the last item: no color seam between sibling surfaces. */
 #signed-in.app-shell #app-navigation-drawer.app-drawer,
 #signed-in.app-shell #app-navigation-drawer .portal-sidebar__header,
 #signed-in.app-shell #app-navigation-drawer #app-navigation,
 #signed-in.app-shell #app-navigation-drawer .sfera-nav-footer{
  background-color:#132652!important;background-image:none!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation{
  color:#fff!important;
 }
 /* Desktop-style white line glyphs — never a blue glyph on a pale tile. */
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-icon{
  display:grid!important;place-items:center!important;
  box-sizing:border-box!important;flex:0 0 22px!important;
  width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important;
  margin:0!important;padding:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;background-image:none!important;
  box-shadow:none!important;outline:0!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  filter:none!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-icon::before,
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-icon::after{
  content:none!important;display:none!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-icon svg{
  display:block!important;box-sizing:content-box!important;
  width:21px!important;height:21px!important;
  margin:0!important;padding:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;background-image:none!important;
  box-shadow:none!important;filter:none!important;
  fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;
  color:#fff!important;opacity:1!important;
 }
 /* Shared desktop label spacing and legibility, including dynamically added
    administrative entries. Do not modify route or visibility attributes. */
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]{
  min-height:44px!important;height:44px!important;flex:0 0 44px!important;
  align-items:center!important;gap:14px!important;
  padding:0 14px!important;
  border:1px solid transparent!important;border-radius:12px!important;
  background:transparent!important;background-image:none!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  font:600 13px/1.2 "Open Sans",sans-serif!important;
  box-shadow:none!important;
  transition:background .16s ease,color .16s ease,border-color .16s ease!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-label{
  display:block!important;max-width:195px!important;
  opacity:1!important;visibility:visible!important;transform:none!important;
  background:transparent!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 /* Identical desktop hover/focus behavior and active-route treatment. */
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]:is(:hover,:focus-visible){
  background:rgba(202,225,255,.105)!important;background-image:none!important;
  border-color:rgba(202,225,255,.08)!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav][aria-current="page"],
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav][aria-current="page"]:is(:hover,:focus-visible,:active){
  background:linear-gradient(95deg,rgba(41,122,234,.39),rgba(44,92,170,.25))!important;
  border-color:rgba(132,182,249,.28)!important;
  box-shadow:inset 3px 0 0 #63b4ff!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]:focus-visible{
  outline:2px solid #b5d7ff!important;outline-offset:-2px!important;
 }
}
@media(prefers-reduced-motion:reduce){
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]{
  transition:none!important;
 }
}

/* 1.146.3 — One canonical set of desktop/mobile navigation states.
   Both layouts now use the same selection gradient, subtle blue perimeter,
   cyan left inset indicator, muted idle text and hover colors. The previous
   mobile-only transparent border was the source of visual divergence. */
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav][aria-current="page"],
#signed-in #app-navigation.app-navigation > :is(a,button)[data-app-nav][aria-current="page"]:is(:hover,:focus-visible,:active) {
  border-color:rgba(132,182,249,.28)!important;
  background:linear-gradient(95deg,rgba(41,122,234,.39),rgba(44,92,170,.25))!important;
  box-shadow:inset 3px 0 0 #63b4ff!important;
  color:#fff!important;
}
@media(max-width:900px){
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]{
  color:var(--sfera-rail-muted)!important;
  -webkit-text-fill-color:var(--sfera-rail-muted)!important;
  -webkit-tap-highlight-color:transparent!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]:is(:hover,:focus-visible,:active){
  color:#fff!important;-webkit-text-fill-color:#fff!important;
  background:rgba(202,225,255,.105)!important;
  border-color:rgba(202,225,255,.08)!important;
  box-shadow:none!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav][aria-current="page"],
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav][aria-current="page"]:is(:hover,:focus-visible,:active){
  background:linear-gradient(95deg,rgba(41,122,234,.39),rgba(44,92,170,.25))!important;
  border-color:rgba(132,182,249,.28)!important;
  box-shadow:inset 3px 0 0 #63b4ff!important;
  color:#fff!important;-webkit-text-fill-color:#fff!important;
 }
 /* Labels inherit the same muted/selected/hover ink as desktop. */
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-label{
  color:inherit!important;-webkit-text-fill-color:inherit!important;
 }
 /* Do not keep all mobile glyphs bright white in the idle state. */
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-icon,
 #signed-in.app-shell #app-navigation-drawer #app-navigation .sfera-nav-icon svg{
  color:inherit!important;-webkit-text-fill-color:inherit!important;
  stroke:currentColor!important;
 }
 #signed-in.app-shell #app-navigation-drawer #app-navigation>:is(a,button)[data-app-nav]:focus-visible{
  outline:2px solid #b5d7ff!important;outline-offset:-2px!important;
 }
}

/* v2.44.2: after selecting a section, keep the desktop icon rail collapsed
   until the pointer leaves it. Hover/focus can open it again afterwards. */
@media(min-width:901px){
 /* IMPORTANT: the normal rail has a 252px layout width clipped to 72px.
    Reducing its width to 72px while retaining the 180px right clip
    hides the entire drawer (2.44.2 regression). Keep both in sync. */
 #signed-in.app-shell:not(.sfera-nav-pinned) #app-navigation-drawer.app-drawer.sfera-nav-after-select{
  width:var(--sfera-rail-expanded)!important;
  clip-path:inset(0 calc(var(--sfera-rail-expanded) - var(--sfera-rail-width)) 0 0)!important;
 }
 #signed-in.app-shell:not(.sfera-nav-pinned) #app-navigation-drawer.sfera-nav-after-select .sfera-nav-label,
 #signed-in.app-shell:not(.sfera-nav-pinned) #app-navigation-drawer.sfera-nav-after-select .sfera-nav-brand__name{
  max-width:0!important;opacity:0!important;visibility:hidden!important;transform:translateX(-4px)!important;
 }
 #signed-in.app-shell:not(.sfera-nav-pinned) #app-navigation-drawer.sfera-nav-after-select #app-navigation .admin-restricted-key{
  display:none!important;
 }
}

/* Restore a reliable, accessible desktop opener. Desktop navigation remains
   visible as the 72px icon rail; the opener expands it deliberately. */
@media(min-width:901px){
 #signed-in.app-shell .app-topbar{justify-content:flex-start!important}
 #signed-in.app-shell .app-topbar #app-menu-toggle.portal-topbar__menu-toggle{
  display:inline-flex!important;flex:0 0 36px!important;
  width:36px!important;min-width:36px!important;max-width:36px!important;
  height:36px!important;min-height:36px!important;max-height:36px!important;
  flex-direction:row!important;align-items:center!important;justify-content:center!important;
  margin:0 10px 0 0!important;padding:7px!important;
  border:1px solid rgba(192,216,255,.23)!important;border-radius:10px!important;
  background:rgba(255,255,255,.075)!important;color:#e8f3ff!important;
  box-shadow:none!important;cursor:pointer!important;opacity:1!important;
 }
 #signed-in.app-shell .app-topbar #app-menu-toggle.portal-topbar__menu-toggle:is(:hover,:focus-visible){
  background:rgba(255,255,255,.16)!important;border-color:rgba(192,216,255,.48)!important;
  outline-offset:2px;
 }
 #signed-in.app-shell .app-topbar #app-menu-toggle .portal-topbar__menu-bars{display:none!important}
 #signed-in.app-shell .app-topbar #app-menu-toggle .sfera-mobile-menu-icon{
  display:block!important;flex:none!important;width:20px!important;height:20px!important;
  fill:none!important;stroke:#e8f3ff!important;opacity:1!important;
 }
 #signed-in.app-shell .app-topbar .portal-topbar__actions{margin-left:auto!important}
}

/* 2.44.5 — Desktop opener belongs to the notification/profile cluster,
   not to the left section heading. Mobile actions keep their original order. */
@media(min-width:901px){
 #signed-in.app-shell .app-topbar .portal-topbar__actions #app-menu-toggle.portal-topbar__menu-toggle{
  order:-1!important;margin:0!important;
 }
}
