/* Menu do TRILHA (identidade B2): barra flutuante arredondada que recolhe até o símbolo da logo (computador)
   e barra flutuante embaixo (celular). Só apresentação: links, rotas e permissões continuam em real.js e no servidor. */
:root{--mn-g7:#0c5c3d;--mn-g8:#07402b;--mn-g9:#06392a;--mn-cream:#f6f5ee;--mn-amber:#f2b705;--mn-ease:cubic-bezier(.16,1,.3,1);--mn-ground:#f3f4ef}
html body .menu-brand,html body .menu-toggle,html body .menu-group,html body .menu-pill,html body .menu-tip{display:none}
html body nav[aria-label="Navegação principal"] a[href="#visitas"]:not(#menu-x){--action-icon:url('assets/ui-route.svg')}
html body nav[aria-label="Navegação principal"] a[href="#agenda"]:not(#menu-x){--action-icon:url('assets/ui-calendar.svg')}
html body nav[aria-label="Navegação principal"] a[href="#tutoriais"]:not(#menu-x){--action-icon:url('assets/ui-play.svg')}
html body.is-authenticated nav[aria-label="Navegação principal"] a[hidden]{display:none!important}

/* ================= Computador ================= */
@media screen and (min-width:1100px){
 html body.is-authenticated{--nw:284px;--desktop-rail:calc(var(--nw) + 36px);background:linear-gradient(180deg,#eef3e9 0,var(--mn-ground) 360px) fixed}
 html body.is-authenticated.menu-compact{--nw:80px}
 html body.is-authenticated::before{display:none}
 html body.is-authenticated :is(main,main>header,#workspace>.toolbar){transition:margin-left .5s var(--mn-ease),left .5s var(--mn-ease)}
 html body.is-authenticated main>header>img{display:none!important}

 html body.is-authenticated nav[aria-label="Navegação principal"]{
  position:fixed;z-index:41;top:14px;bottom:14px;left:14px;right:auto;width:var(--nw);max-height:none;padding:18px 16px 16px;margin:0;
  display:flex;flex-direction:column;gap:2px;overflow:visible;border:0;border-radius:30px;
  background:linear-gradient(180deg,var(--mn-g7) 0%,var(--mn-g8) 100%);color:#fff;
  box-shadow:0 1px 0 rgba(255,255,255,.1) inset,0 24px 44px -24px rgba(4,40,26,.65),0 2px 6px rgba(4,40,26,.18);
  transition:width .5s var(--mn-ease)}
 html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more{display:none}
 html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more-panel{display:contents}

 /* marca: logo completa aberta; só o símbolo recolhida */
 html body.is-authenticated .menu-brand{display:block;position:relative;flex:none;height:64px;margin-bottom:8px;border-radius:18px;color:inherit;cursor:pointer}
 .menu-brand .full{position:absolute;left:6px;top:50%;width:152px;transform:translateY(-50%);transition:opacity .25s ease .1s;pointer-events:none}
 .menu-brand .full-w{filter:brightness(0) invert(1)}
 .menu-brand .full-c{clip-path:inset(0 0 68% 0)}
 .menu-brand .sym{position:absolute;left:0;top:50%;width:48px;height:48px;margin-top:-24px;border-radius:16px;background:var(--mn-cream);display:grid;place-items:center;opacity:0;transform:scale(.8);transition:opacity .25s ease,transform .45s var(--mn-ease)}
 .menu-brand .sym img{width:32px;height:32px;display:block}
 body.menu-compact .menu-brand .full{opacity:0;transition-delay:0s}
 body.menu-compact .menu-brand .sym{opacity:1;transform:none;transition-delay:.18s}
 .menu-brand:focus-visible{outline:3px solid var(--mn-amber);outline-offset:2px}

 /* botão redondo na borda: recolher / expandir */
 html body.is-authenticated .menu-toggle{display:grid;place-items:center;position:absolute;z-index:3;right:-16px;top:30px;width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--mn-cream);color:var(--mn-g7);
  box-shadow:0 0 0 4px var(--mn-ground),0 6px 14px -4px rgba(4,40,26,.45);transition:transform .2s ease,background .2s;cursor:pointer}
 html body.is-authenticated .menu-toggle::before{content:none}
 .menu-toggle svg{width:16px;height:16px;transition:transform .5s var(--mn-ease)}
 .menu-toggle:hover{background:#fff;transform:scale(1.08)}
 .menu-toggle:focus-visible{outline:3px solid var(--mn-amber);outline-offset:2px}
 body.menu-compact .menu-toggle svg{transform:rotate(180deg)}

 /* indicador que desliza até o item atual */
 html body.is-authenticated .menu-pill{display:block;position:absolute;z-index:0;left:0;top:0;width:0;height:48px;border-radius:16px;background:var(--mn-cream);box-shadow:0 6px 14px -8px rgba(0,0,0,.4);transition:transform .45s var(--mn-ease),opacity .2s;pointer-events:none}

 html body.is-authenticated .menu-group{display:flex;align-items:flex-end;position:relative;height:36px;margin:0;padding:0 14px 8px}
 .menu-group span{font-size:11.5px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.55);white-space:nowrap;transition:opacity .2s ease .12s}
 .menu-group::after{content:"";position:absolute;left:18px;right:18px;bottom:17px;height:1px;background:rgba(255,255,255,.18);opacity:0;transition:opacity .2s ease}
 body.menu-compact .menu-group span{opacity:0;transition-delay:0s}
 body.menu-compact .menu-group::after{opacity:1;transition-delay:.2s}

 html body.is-authenticated nav[aria-label="Navegação principal"] a{
  position:relative;z-index:1;flex:none;display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:14px;width:auto;min-height:48px;height:48px;padding:0 13px;margin:0;
  border:0;border-radius:16px;background:transparent;box-shadow:none;overflow:visible;white-space:nowrap;
  color:rgba(255,255,255,.88);font-size:15.5px;font-weight:600;transition:background .2s,color .25s}
 html body.is-authenticated nav[aria-label="Navegação principal"] a::before{width:22px;height:22px;flex:0 0 22px;margin:0;background:currentColor}
 html body.is-authenticated nav[aria-label="Navegação principal"] a::after{content:none!important}
 html body.is-authenticated nav[aria-label="Navegação principal"] a:hover{background:rgba(255,255,255,.09);color:#fff;box-shadow:none}
 html body.is-authenticated nav[aria-label="Navegação principal"] a[aria-current=page]{background:transparent;color:var(--mn-g7);box-shadow:none;border:0}
 html body.is-authenticated nav[aria-label="Navegação principal"] a[aria-current=page]:hover{background:transparent}
 html body.is-authenticated nav[aria-label="Navegação principal"] a:focus-visible{outline:3px solid var(--mn-amber);outline-offset:-3px}
 .menu-lb{display:block;overflow:hidden;max-width:180px;opacity:1;transition:max-width .5s var(--mn-ease),opacity .2s ease .1s}
 body.menu-compact .menu-lb{max-width:0;opacity:0;transition-delay:0s}
 html body.is-authenticated nav[aria-label="Navegação principal"] a .menu-tip{position:absolute;left:calc(100% + 28px);top:50%;transform:translate(-6px,-50%);padding:7px 12px;border-radius:10px;background:var(--mn-g9);color:#fff;font-size:13.5px;font-weight:600;white-space:nowrap;opacity:0;pointer-events:none;transition:opacity .15s,transform .25s var(--mn-ease);box-shadow:0 8px 18px -6px rgba(0,0,0,.45)}
 html body.menu-compact nav[aria-label="Navegação principal"] a .menu-tip{display:block}
 html body.menu-compact nav[aria-label="Navegação principal"] a:is(:hover,:focus-visible) .menu-tip{opacity:1;transform:translate(0,-50%)}
 html body.is-authenticated.menu-compact nav[aria-label="Navegação principal"] a{justify-content:center;gap:0}
 html body.is-authenticated .menu-toggle .menu-tip{display:none}
}
@media screen and (min-width:1100px) and (max-width:1300px){html body.is-authenticated{--nw:256px}}
@media screen and (min-width:1100px) and (max-height:760px){
 html body.is-authenticated nav[aria-label="Navegação principal"] a{height:42px;min-height:42px}
 .menu-group{height:30px!important}
}
@media screen and (min-width:1100px) and (prefers-reduced-motion:reduce){
 html body.is-authenticated :is(main,main>header,#workspace>.toolbar,nav,.menu-toggle,.menu-pill),.menu-lb,.menu-brand :is(.full,.sym),.menu-toggle svg,.menu-group span{transition:none!important}
}

/* ================= Celular e tablet: barra flutuante ================= */
@media screen and (max-width:1099px){
 html body.is-authenticated nav[aria-label="Navegação principal"]{
  left:12px;right:12px;bottom:calc(12px + env(safe-area-inset-bottom));top:auto;width:auto;height:70px;padding:6px;gap:0;overflow:visible;
  border:0;border-radius:30px;background:linear-gradient(180deg,var(--mn-g7),var(--mn-g8));
  box-shadow:0 1px 0 rgba(255,255,255,.1) inset,0 18px 34px -14px rgba(4,40,26,.75)}
 html body.is-authenticated .menu-pill{display:block;position:absolute;z-index:0;left:0;top:0;width:0;height:58px;border-radius:24px;background:var(--mn-cream);transition:transform .45s var(--mn-ease),opacity .2s;pointer-events:none}
 html body.is-authenticated nav[aria-label="Navegação principal"]>a,
 html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more{position:relative;z-index:1;min-height:58px;height:58px;border-radius:24px;background:transparent;border:0;color:rgba(255,255,255,.88);font-size:11.5px;font-weight:700;box-shadow:none}
 html body.is-authenticated nav[aria-label="Navegação principal"]>a[aria-current=page],
 html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more.is-current{background:transparent;color:var(--mn-g7)}
 html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more[aria-expanded=true]:not(.is-current){background:rgba(255,255,255,.14);color:#fff}
 html body.is-authenticated nav[aria-label="Navegação principal"]>a::before,
 html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more::before{background:currentColor}
 html body.is-authenticated nav[aria-label="Navegação principal"]>a::after{content:none!important}
 html body.is-authenticated nav[aria-label="Navegação principal"]::before{content:none!important}
 html body.is-authenticated nav[aria-label="Navegação principal"] a:focus-visible,html body.is-authenticated nav[aria-label="Navegação principal"] .nav-more:focus-visible{outline:3px solid var(--mn-amber);outline-offset:-3px}
 html body.is-authenticated .nav-more-panel{bottom:calc(100% + 10px);border-radius:20px}
 html body.is-authenticated .nav-more-panel a{color:#004d43;height:auto}
 html body.is-authenticated .nav-more-panel a[aria-current=page]{background:#e8f0e4;color:#004d43}
 html body.is-authenticated main{padding-bottom:116px}
}
@media (prefers-reduced-motion:reduce){.menu-pill{transition:none!important}}
