/* ObraGestão 8.6.3.23 — navegação lateral fixa + topo claro */
:root{
  --shell-sidebar-compact:68px;
  --shell-sidebar-expanded:238px;
  --shell-header-h:64px;
  --shell-side:#0e2238;
  --shell-side-deep:#0a1b2d;
  --shell-side-hover:#173653;
  --shell-side-active:#1769e0;
  --shell-side-text:#f4f8fc;
  --shell-side-muted:#9eb2c8;
  --shell-top:#f8fafc;
  --shell-top-line:#dbe4ee;
}

@media(min-width:801px){
  /* Sidebar: sempre ocupa do topo ao rodapé */
  #nav{
    top:0!important;
    bottom:0!important;
    left:0!important;
    height:100dvh!important;
    width:var(--shell-sidebar-compact)!important;
    padding:0!important;
    background:linear-gradient(180deg,var(--shell-side) 0%,var(--shell-side-deep) 100%)!important;
    border-right:1px solid rgba(255,255,255,.07)!important;
    box-shadow:none!important;
    overflow:hidden!important;
    z-index:12050!important;
    transition:width .18s ease,box-shadow .18s ease!important;
    display:flex!important;
    flex-direction:column!important;
  }
  body.sidebar-pinned #nav,
  body:not(.sidebar-pinned) #nav:hover,
  body:not(.sidebar-pinned) #nav.force-open{
    width:var(--shell-sidebar-expanded)!important;
  }
  body:not(.sidebar-pinned) #nav:hover,
  body:not(.sidebar-pinned) #nav.force-open{
    box-shadow:12px 0 30px rgba(4,17,31,.22)!important;
  }

  #nav .nav-brand-mini{
    order:0!important;
    height:var(--shell-header-h)!important;
    flex:0 0 var(--shell-header-h)!important;
    display:flex!important;
    align-items:center!important;
    gap:10px!important;
    padding:0 15px!important;
    background:transparent!important;
    border-bottom:1px solid rgba(255,255,255,.08)!important;
    color:#fff!important;
    overflow:hidden!important;
  }
  #nav .brand-app-icon{
    width:38px!important;height:38px!important;min-width:38px!important;
    border-radius:9px!important;display:block!important;
    box-shadow:0 4px 12px rgba(0,0,0,.18)!important;
  }
  #nav .nav-brand-mini b{
    color:#fff!important;font-size:18px!important;letter-spacing:-.35px!important;
    opacity:0!important;width:0!important;max-width:0!important;overflow:hidden!important;
    margin:0!important;transition:opacity .14s ease,max-width .18s ease!important;
  }
  #nav .nav-brand-mini b span{color:#5ba6ff!important}
  body.sidebar-pinned #nav .nav-brand-mini b,
  body:not(.sidebar-pinned) #nav:hover .nav-brand-mini b,
  body:not(.sidebar-pinned) #nav.force-open .nav-brand-mini b{
    opacity:1!important;width:auto!important;max-width:160px!important;
  }

  #nav .nav-fixed-top{order:1!important;flex:0 0 auto!important;background:transparent!important;border-bottom:1px solid rgba(255,255,255,.07)!important;padding:8px 0!important}
  #nav .nav-scroll{order:2!important;flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;overflow-x:hidden!important;padding:8px 0!important;scrollbar-width:none!important}
  #nav .nav-fixed-bottom{order:3!important;flex:0 0 auto!important;background:transparent!important;border-top:1px solid rgba(255,255,255,.07)!important;padding:7px 0 6px!important}
  #nav .nav-version-footer{
    order:4!important;flex:0 0 auto!important;min-height:65px!important;padding:11px 15px 13px!important;
    border-top:1px solid rgba(255,255,255,.08)!important;color:#fff!important;
    display:flex!important;flex-direction:column!important;justify-content:center!important;gap:2px!important;
    overflow:hidden!important;white-space:nowrap!important;
  }
  #nav .nav-version-footer strong,#nav .nav-version-footer span{opacity:0!important;width:0!important;overflow:hidden!important;transition:opacity .14s ease!important}
  body.sidebar-pinned #nav .nav-version-footer strong,
  body.sidebar-pinned #nav .nav-version-footer span,
  body:not(.sidebar-pinned) #nav:hover .nav-version-footer strong,
  body:not(.sidebar-pinned) #nav:hover .nav-version-footer span,
  body:not(.sidebar-pinned) #nav.force-open .nav-version-footer strong,
  body:not(.sidebar-pinned) #nav.force-open .nav-version-footer span{opacity:1!important;width:auto!important}
  #nav .nav-version-footer strong{font-size:13px!important;font-weight:700!important}
  #nav .nav-version-footer span{font-size:12px!important;color:var(--shell-side-muted)!important}
  body:not(.sidebar-pinned) #nav:not(:hover):not(.force-open) .nav-version-footer::before{
    content:"v8";display:grid;width:38px;height:30px;place-items:center;border:1px solid rgba(255,255,255,.12);border-radius:8px;color:#b8c8d8;font-size:10px;font-weight:800;
  }

  /* Itens do menu */
  #nav>button,
  #nav .nav-fixed-top>button,
  #nav .nav-scroll>button,
  #nav .nav-fixed-bottom>button{
    height:44px!important;min-height:44px!important;
    width:52px!important;margin:2px 8px!important;padding:0 11px!important;
    display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:12px!important;
    border:0!important;border-radius:9px!important;background:transparent!important;
    color:#d9e5f0!important;box-shadow:none!important;transform:none!important;
    overflow:hidden!important;white-space:nowrap!important;
    transition:background .14s ease,color .14s ease,width .18s ease!important;
  }
  body.sidebar-pinned #nav>button,
  body.sidebar-pinned #nav .nav-fixed-top>button,
  body.sidebar-pinned #nav .nav-scroll>button,
  body.sidebar-pinned #nav .nav-fixed-bottom>button,
  body:not(.sidebar-pinned) #nav:hover>button,
  body:not(.sidebar-pinned) #nav:hover .nav-fixed-top>button,
  body:not(.sidebar-pinned) #nav:hover .nav-scroll>button,
  body:not(.sidebar-pinned) #nav:hover .nav-fixed-bottom>button,
  body:not(.sidebar-pinned) #nav.force-open>button,
  body:not(.sidebar-pinned) #nav.force-open .nav-fixed-top>button,
  body:not(.sidebar-pinned) #nav.force-open .nav-scroll>button,
  body:not(.sidebar-pinned) #nav.force-open .nav-fixed-bottom>button{
    width:calc(100% - 16px)!important;
  }
  #nav .nav-icon{width:30px!important;min-width:30px!important;height:30px!important;display:grid!important;place-items:center!important;color:inherit!important}
  #nav .nav-icon svg{width:21px!important;height:21px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
  #nav .nav-label{display:block!important;opacity:0!important;width:0!important;max-width:0!important;overflow:hidden!important;color:inherit!important;font-size:13px!important;font-weight:500!important;transition:opacity .13s ease,max-width .16s ease!important}
  body.sidebar-pinned #nav .nav-label,
  body:not(.sidebar-pinned) #nav:hover .nav-label,
  body:not(.sidebar-pinned) #nav.force-open .nav-label{
    opacity:1!important;width:auto!important;max-width:165px!important;overflow:visible!important;
  }
  #nav button:hover{background:var(--shell-side-hover)!important;color:#fff!important}
  #nav button.active,#sidebarWorkCurrent.active{background:transparent!important;color:#69aefc!important;border:0!important;box-shadow:none!important}
  #nav button.active .nav-icon,#nav button.active .nav-label{color:#69aefc!important}
  #nav .nav-section{color:#7992ab!important;border:0!important;font-size:10px!important;font-weight:800!important;letter-spacing:.07em!important;padding:10px 17px 5px!important;height:auto!important;text-indent:0!important}
  body:not(.sidebar-pinned) #nav:not(:hover):not(.force-open) .nav-section{font-size:0!important;height:8px!important;padding:4px 0!important}

  /* obra atual dentro do menu */
  #sidebarWorkCurrent{
    height:52px!important;min-height:52px!important;width:52px!important;margin:4px 8px!important;padding:6px!important;
    background:rgba(255,255,255,.06)!important;border:1px solid rgba(255,255,255,.10)!important;color:#fff!important;
  }
  body.sidebar-pinned #sidebarWorkCurrent,
  body:not(.sidebar-pinned) #nav:hover #sidebarWorkCurrent,
  body:not(.sidebar-pinned) #nav.force-open #sidebarWorkCurrent{width:calc(100% - 16px)!important;justify-content:flex-start!important}
  #sidebarWorkCurrent .sidebar-work-copy{color:#fff!important}
  #sidebarWorkCurrent .sidebar-work-copy small{color:#9fb3c8!important}
  #sidebarWorkCurrent .sidebar-work-copy b{color:#fff!important}
  #sidebarWorkCurrent .sidebar-work-arrow{color:#cfe1f4!important}

  /* Header horizontal claro e independente do menu */
  header{
    top:0!important;left:0!important;right:auto!important;
    height:var(--shell-header-h)!important;
    margin-left:var(--shell-sidebar-compact)!important;
    width:calc(100% - var(--shell-sidebar-compact))!important;
    padding:0 22px!important;
    background:var(--shell-top)!important;color:#17324f!important;
    border-bottom:1px solid var(--shell-top-line)!important;
    box-shadow:0 1px 7px rgba(15,39,65,.05)!important;
    z-index:100!important;
    transition:margin-left .18s ease,width .18s ease!important;
  }
  body.sidebar-pinned header{margin-left:var(--shell-sidebar-expanded)!important;width:calc(100% - var(--shell-sidebar-expanded))!important}
  body:not(.sidebar-pinned):has(#nav:hover) header,
  body:not(.sidebar-pinned):has(#nav.force-open) header{margin-left:var(--shell-sidebar-compact)!important;width:calc(100% - var(--shell-sidebar-compact))!important}
  header .header-left{display:flex!important;align-items:center!important;gap:14px!important;min-width:0!important;flex:1 1 auto!important}
  header .header-user{display:flex!important;align-items:center!important;gap:10px!important;color:#172f4a!important}
  header .header-user-text,#who,header .header-user-text small{color:#17324f!important}
  header .header-user-text small{color:#75879a!important}
  header .avatar{background:#1769d9!important;color:#fff!important}
  header #logout{background:#fff!important;color:#193a5d!important;border:1px solid #d4dee8!important;box-shadow:none!important}
  header .top-work-select{background:#fff!important;color:#17324f!important;border:1px solid #d6e0ea!important;box-shadow:none!important;height:44px!important}
  header .top-work-copy label{color:#7a8a9b!important}
  header .top-work-copy select,header .viewer-work-name{color:#17324f!important}

  .sidebar-mode-toggle{
    width:38px;height:38px;min-width:38px;display:grid;place-items:center;border:1px solid #d5dfe9;border-radius:9px;background:#fff;color:#1b3653;cursor:pointer;box-shadow:0 1px 2px rgba(10,35,60,.03);transition:background .14s ease,border-color .14s ease;
  }
  .sidebar-mode-toggle:hover{background:#eef4fa;border-color:#becddd}
  .sidebar-toggle-icon{position:relative;display:block;width:20px;height:17px;border:1.7px solid currentColor;border-radius:4px}
  .sidebar-toggle-icon i{position:absolute;left:2px;top:2px;bottom:2px;width:4px;border-radius:2px;background:currentColor;transition:width .15s ease}
  .sidebar-toggle-icon b{position:absolute;left:8px;top:2px;bottom:2px;width:1.5px;background:currentColor;opacity:.28;transition:left .15s ease}
  .sidebar-mode-toggle[aria-pressed="true"] .sidebar-toggle-icon i{width:7px}
  .sidebar-mode-toggle[aria-pressed="true"] .sidebar-toggle-icon b{left:11px}

  .header-notification-btn{position:relative;width:38px;height:38px;display:grid;place-items:center;border:0;border-radius:9px;background:transparent;color:#132f4d;cursor:pointer}
  .header-notification-btn:hover{background:#edf3f8}
  .header-notification-btn svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .notification-dot{position:absolute;right:8px;top:7px;width:7px;height:7px;border:2px solid var(--shell-top);border-radius:50%;background:#ef3d47}
  .header-notification-popover{position:fixed;right:142px;top:57px;z-index:15000;width:250px;padding:13px 14px;border:1px solid #d8e2ec;border-radius:11px;background:#fff;color:#254361;box-shadow:0 14px 34px rgba(12,34,58,.14);font-size:12px}
  .header-notification-popover b{display:block;font-size:13px;margin-bottom:3px;color:#183653}
  .header-notification-popover small{color:#71849a}

  main{
    margin-left:var(--shell-sidebar-compact)!important;
    width:calc(100% - var(--shell-sidebar-compact))!important;
    padding-top:calc(var(--shell-header-h) + 24px)!important;
    transition:margin-left .18s ease,width .18s ease!important;
  }
  body.sidebar-pinned main{margin-left:var(--shell-sidebar-expanded)!important;width:calc(100% - var(--shell-sidebar-expanded))!important}
  body:not(.sidebar-pinned):has(#nav:hover) main,
  body:not(.sidebar-pinned):has(#nav.force-open) main{margin-left:var(--shell-sidebar-compact)!important;width:calc(100% - var(--shell-sidebar-compact))!important}

  /* seletor de obras / gate acompanha somente o modo fixado */
  .work-gate{left:var(--shell-sidebar-compact)!important;top:var(--shell-header-h)!important}
  body.sidebar-pinned .work-gate{left:var(--shell-sidebar-expanded)!important}
}

@media(max-width:800px){
  .sidebar-mode-toggle{display:none!important}
  .header-notification-btn{width:34px!important;height:34px!important;color:#17324f!important}
  .notification-dot{right:6px;top:5px;border-color:#fff}
  header{background:#f8fafc!important;color:#17324f!important;border-bottom:1px solid #dbe4ee!important}
  header .header-user-text,#who,header .header-user-text small{color:#17324f!important}
  #nav{background:linear-gradient(180deg,var(--shell-side) 0%,var(--shell-side-deep) 100%)!important;color:#fff!important}
  #nav .nav-brand-mini{background:transparent!important;color:#fff!important;border-color:rgba(255,255,255,.08)!important}
  #nav .brand-app-icon{width:36px;height:36px;border-radius:8px}
  #nav button,#nav button .nav-label,#nav button .nav-icon,#nav .nav-label,#nav .nav-icon{color:#dce7f2!important}
  #nav button:hover{background:var(--shell-side-hover)!important;color:#fff!important}
  #nav button.active{background:transparent!important;color:#69aefc!important;border-left:0!important;box-shadow:none!important}
  #nav .nav-section{color:#7891a9!important;border-color:rgba(255,255,255,.08)!important}
  #nav .nav-version-footer{padding:12px 16px 15px;border-top:1px solid rgba(255,255,255,.08);color:#fff;display:flex;flex-direction:column;gap:2px}
  #nav .nav-version-footer span{color:#9db1c5;font-size:12px}
}
@media(min-width:801px){
  .header-notification-btn{order:0}
  header .avatar{order:1}
  header .header-user-text{order:2;text-align:left!important}
  header #logout{order:3}
}


/* ===== ObraGestão 8.6.3.24 — hotfix estado fixo/compacto do sidebar ===== */
@media(min-width:801px){
  /* O próprio sidebar passa a ser a fonte de verdade do estado visual. */
  #nav[data-shell-mode="pinned"]{
    width:var(--shell-sidebar-expanded)!important;
    overflow:hidden!important;
  }
  #nav[data-shell-mode="compact"]{
    width:var(--shell-sidebar-compact)!important;
  }
  #nav[data-shell-mode="compact"]:hover,
  #nav[data-shell-mode="compact"].force-open{
    width:var(--shell-sidebar-expanded)!important;
    box-shadow:12px 0 30px rgba(4,17,31,.22)!important;
  }

  /* Evita que temas antigos pintem seções inteiras do menu. */
  #nav[data-shell-mode] .nav-fixed-top,
  #nav[data-shell-mode] .nav-scroll,
  #nav[data-shell-mode] .nav-fixed-bottom{
    background:transparent!important;
  }
  #nav[data-shell-mode] .nav-scroll{
    box-shadow:none!important;
  }

  /* FIXO: textos, marca e rodapé sempre visíveis. */
  #nav[data-shell-mode="pinned"] .nav-brand-mini b,
  #nav[data-shell-mode="pinned"] .nav-label,
  #nav[data-shell-mode="pinned"] .nav-version-footer strong,
  #nav[data-shell-mode="pinned"] .nav-version-footer span{
    display:block!important;
    opacity:1!important;
    width:auto!important;
    max-width:170px!important;
    overflow:visible!important;
  }
  #nav[data-shell-mode="pinned"] .nav-brand-mini b{
    margin-left:0!important;
  }
  #nav[data-shell-mode="pinned"] .nav-section{
    font-size:10px!important;
    height:auto!important;
    padding:10px 17px 5px!important;
    text-indent:0!important;
  }

  /* FIXO: cada botão é uma linha normal, nunca uma faixa grande. */
  #nav[data-shell-mode="pinned"]>button,
  #nav[data-shell-mode="pinned"] .nav-fixed-top>button,
  #nav[data-shell-mode="pinned"] .nav-scroll>button,
  #nav[data-shell-mode="pinned"] .nav-fixed-bottom>button{
    width:calc(100% - 16px)!important;
    height:44px!important;
    min-height:44px!important;
    margin:2px 8px!important;
    padding:0 12px!important;
    justify-content:flex-start!important;
    gap:12px!important;
    border-radius:9px!important;
  }
  #nav[data-shell-mode="pinned"] .nav-icon{
    width:30px!important;
    min-width:30px!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent{
    width:calc(100% - 16px)!important;
    justify-content:flex-start!important;
    gap:10px!important;
    padding:6px 10px!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-copy{
    display:flex!important;
    opacity:1!important;
    min-width:0!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-arrow{
    display:grid!important;
    opacity:1!important;
  }

  /* COMPACTO: só ícones; no hover expande temporariamente. */
  #nav[data-shell-mode="compact"]:not(:hover):not(.force-open) .nav-brand-mini b,
  #nav[data-shell-mode="compact"]:not(:hover):not(.force-open) .nav-label,
  #nav[data-shell-mode="compact"]:not(:hover):not(.force-open) .nav-version-footer strong,
  #nav[data-shell-mode="compact"]:not(:hover):not(.force-open) .nav-version-footer span{
    opacity:0!important;
    width:0!important;
    max-width:0!important;
    overflow:hidden!important;
  }
  #nav[data-shell-mode="compact"]:hover .nav-label,
  #nav[data-shell-mode="compact"].force-open .nav-label,
  #nav[data-shell-mode="compact"]:hover .nav-brand-mini b,
  #nav[data-shell-mode="compact"].force-open .nav-brand-mini b,
  #nav[data-shell-mode="compact"]:hover .nav-version-footer strong,
  #nav[data-shell-mode="compact"]:hover .nav-version-footer span,
  #nav[data-shell-mode="compact"].force-open .nav-version-footer strong,
  #nav[data-shell-mode="compact"].force-open .nav-version-footer span{
    display:block!important;
    opacity:1!important;
    width:auto!important;
    max-width:170px!important;
    overflow:visible!important;
  }
  #nav[data-shell-mode="compact"]:hover>button,
  #nav[data-shell-mode="compact"]:hover .nav-fixed-top>button,
  #nav[data-shell-mode="compact"]:hover .nav-scroll>button,
  #nav[data-shell-mode="compact"]:hover .nav-fixed-bottom>button,
  #nav[data-shell-mode="compact"].force-open>button,
  #nav[data-shell-mode="compact"].force-open .nav-fixed-top>button,
  #nav[data-shell-mode="compact"].force-open .nav-scroll>button,
  #nav[data-shell-mode="compact"].force-open .nav-fixed-bottom>button{
    width:calc(100% - 16px)!important;
    margin:2px 8px!important;
    padding:0 12px!important;
    justify-content:flex-start!important;
    gap:12px!important;
  }

  /* Destaque fica restrito ao botão atual. */
  #nav[data-shell-mode] .nav-fixed-top>button.active,
  #nav[data-shell-mode] .nav-scroll>button.active,
  #nav[data-shell-mode] .nav-fixed-bottom>button.active{
    background:transparent!important;
    background-color:transparent!important;
    background-image:none!important;
    color:#69aefc!important;
    box-shadow:none!important;
    border:0!important;
  }
  #nav[data-shell-mode] .nav-fixed-top>button.active .nav-icon,
  #nav[data-shell-mode] .nav-fixed-top>button.active .nav-label,
  #nav[data-shell-mode] .nav-scroll>button.active .nav-icon,
  #nav[data-shell-mode] .nav-scroll>button.active .nav-label,
  #nav[data-shell-mode] .nav-fixed-bottom>button.active .nav-icon,
  #nav[data-shell-mode] .nav-fixed-bottom>button.active .nav-label{
    color:#69aefc!important;
  }

  /* Conteúdo e topo acompanham apenas o modo fixado. */
  body:has(#nav[data-shell-mode="pinned"]) header{
    margin-left:var(--shell-sidebar-expanded)!important;
    width:calc(100% - var(--shell-sidebar-expanded))!important;
  }
  body:has(#nav[data-shell-mode="pinned"]) main{
    margin-left:var(--shell-sidebar-expanded)!important;
    width:calc(100% - var(--shell-sidebar-expanded))!important;
  }
  body:has(#nav[data-shell-mode="pinned"]) .work-gate{
    left:var(--shell-sidebar-expanded)!important;
  }
  body:has(#nav[data-shell-mode="compact"]) header{
    margin-left:var(--shell-sidebar-compact)!important;
    width:calc(100% - var(--shell-sidebar-compact))!important;
  }
  body:has(#nav[data-shell-mode="compact"]) main{
    margin-left:var(--shell-sidebar-compact)!important;
    width:calc(100% - var(--shell-sidebar-compact))!important;
  }
}

/* ===== ObraGestão 8.6.3.25 — modo fixo realmente estático ===== */
@media(min-width:801px){
  /* No modo fixo não existe comportamento de expandir/retrair por hover. */
  #nav[data-shell-mode="pinned"],
  #nav[data-shell-mode="pinned"]:hover,
  #nav[data-shell-mode="pinned"].force-open{
    width:var(--shell-sidebar-expanded)!important;
    box-shadow:none!important;
    transition:none!important;
  }

  /* Marca, rótulos, obra atual e versão permanecem sempre visíveis no fixo. */
  #nav[data-shell-mode="pinned"] .nav-brand-mini b,
  #nav[data-shell-mode="pinned"] .nav-label,
  #nav[data-shell-mode="pinned"] .nav-version-footer strong,
  #nav[data-shell-mode="pinned"] .nav-version-footer span,
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-copy,
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-arrow{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    width:auto!important;
    max-width:170px!important;
    overflow:visible!important;
    transition:none!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-copy{
    display:flex!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-arrow{
    display:grid!important;
  }

  /* Nada muda de largura quando o mouse entra/sai no modo fixo. */
  #nav[data-shell-mode="pinned"]>button,
  #nav[data-shell-mode="pinned"] .nav-fixed-top>button,
  #nav[data-shell-mode="pinned"] .nav-scroll>button,
  #nav[data-shell-mode="pinned"] .nav-fixed-bottom>button,
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent{
    width:calc(100% - 16px)!important;
    transition:background .14s ease,color .14s ease!important;
  }
  #nav[data-shell-mode="pinned"] .nav-section{
    transition:none!important;
  }

  /* A expansão suave fica EXCLUSIVAMENTE no modo compacto. */
  #nav[data-shell-mode="compact"]{
    transition:width .18s ease,box-shadow .18s ease!important;
  }
  #nav[data-shell-mode="compact"] .nav-brand-mini b,
  #nav[data-shell-mode="compact"] .nav-label,
  #nav[data-shell-mode="compact"] .nav-version-footer strong,
  #nav[data-shell-mode="compact"] .nav-version-footer span{
    transition:opacity .13s ease,max-width .16s ease!important;
  }
  #nav[data-shell-mode="compact"]>button,
  #nav[data-shell-mode="compact"] .nav-fixed-top>button,
  #nav[data-shell-mode="compact"] .nav-scroll>button,
  #nav[data-shell-mode="compact"] .nav-fixed-bottom>button,
  #nav[data-shell-mode="compact"] #sidebarWorkCurrent{
    transition:background .14s ease,color .14s ease,width .18s ease!important;
  }
}

/* ===== ObraGestão 8.6.3.27 — pinned sem qualquer efeito de hover ===== */
@media(min-width:801px){
  /* FIXO: o mouse não altera geometria, rótulos, ícones ou obra atual. */
  #nav[data-shell-mode="pinned"],
  #nav[data-shell-mode="pinned"]:hover,
  #nav[data-shell-mode="pinned"].force-open{
    width:var(--shell-sidebar-expanded)!important;
    box-shadow:none!important;
  }

  #nav[data-shell-mode="pinned"] .nav-brand-mini,
  #nav[data-shell-mode="pinned"]:hover .nav-brand-mini{
    padding:0 15px!important;
    gap:10px!important;
  }
  #nav[data-shell-mode="pinned"] .nav-brand-mini b,
  #nav[data-shell-mode="pinned"]:hover .nav-brand-mini b{
    display:block!important;
    opacity:1!important;
    visibility:visible!important;
    width:auto!important;
    max-width:160px!important;
    margin:0!important;
    transition:none!important;
  }

  #nav[data-shell-mode="pinned"] .nav-scroll,
  #nav[data-shell-mode="pinned"]:hover .nav-scroll{
    scrollbar-width:none!important;
    overflow-x:hidden!important;
  }
  #nav[data-shell-mode="pinned"] .nav-scroll::-webkit-scrollbar,
  #nav[data-shell-mode="pinned"]:hover .nav-scroll::-webkit-scrollbar{
    width:0!important;
  }

  #nav[data-shell-mode="pinned"]>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"] .nav-fixed-top>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"] .nav-scroll>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"] .nav-fixed-bottom>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"]:hover>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"]:hover .nav-fixed-top>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"]:hover .nav-scroll>button:not(.sidebar-work-current),
  #nav[data-shell-mode="pinned"]:hover .nav-fixed-bottom>button:not(.sidebar-work-current){
    width:calc(100% - 16px)!important;
    height:44px!important;
    min-height:44px!important;
    margin:2px 8px!important;
    padding:0 12px!important;
    justify-content:flex-start!important;
    gap:12px!important;
    transform:none!important;
    transition:background .14s ease,color .14s ease!important;
  }
  #nav[data-shell-mode="pinned"] .nav-icon,
  #nav[data-shell-mode="pinned"]:hover .nav-icon{
    width:30px!important;
    min-width:30px!important;
    margin:0!important;
    transform:none!important;
  }
  #nav[data-shell-mode="pinned"] .nav-label,
  #nav[data-shell-mode="pinned"]:hover .nav-label{
    display:block!important;
    opacity:1!important;
    visibility:visible!important;
    width:auto!important;
    max-width:165px!important;
    overflow:visible!important;
    transition:none!important;
  }
  #nav[data-shell-mode="pinned"] .nav-section,
  #nav[data-shell-mode="pinned"]:hover .nav-section{
    font-size:10px!important;
    height:auto!important;
    padding:10px 17px 5px!important;
    text-indent:0!important;
    transition:none!important;
  }

  /* Obra atual fica sempre no layout expandido, inclusive sem hover. */
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent,
  #nav[data-shell-mode="pinned"]:hover #sidebarWorkCurrent{
    position:relative!important;
    width:calc(100% - 16px)!important;
    height:52px!important;
    min-height:52px!important;
    margin:4px 8px!important;
    padding:6px 10px!important;
    display:flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    gap:10px!important;
    overflow:hidden!important;
    transition:background .14s ease,color .14s ease!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent[style*="display:none"],
  #nav[data-shell-mode="pinned"]:hover #sidebarWorkCurrent[style*="display:none"]{
    display:none!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-thumb,
  #nav[data-shell-mode="pinned"]:hover #sidebarWorkCurrent .sidebar-work-thumb{
    position:static!important;
    left:auto!important;
    transform:none!important;
    width:30px!important;
    height:30px!important;
    min-width:30px!important;
    flex:0 0 30px!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-copy,
  #nav[data-shell-mode="pinned"]:hover #sidebarWorkCurrent .sidebar-work-copy{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    width:auto!important;
    min-width:0!important;
    flex:1 1 auto!important;
    transition:none!important;
  }
  #nav[data-shell-mode="pinned"] #sidebarWorkCurrent .sidebar-work-arrow,
  #nav[data-shell-mode="pinned"]:hover #sidebarWorkCurrent .sidebar-work-arrow{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    position:static!important;
    width:22px!important;
    height:22px!important;
    min-width:22px!important;
    transform:none!important;
    transition:none!important;
  }

  /* Rodapé e chevrons não aparecem/desaparecem por hover no fixo. */
  #nav[data-shell-mode="pinned"] .nav-version-footer strong,
  #nav[data-shell-mode="pinned"] .nav-version-footer span,
  #nav[data-shell-mode="pinned"]:hover .nav-version-footer strong,
  #nav[data-shell-mode="pinned"]:hover .nav-version-footer span{
    display:block!important;
    opacity:1!important;
    visibility:visible!important;
    width:auto!important;
    transition:none!important;
  }
  #nav[data-shell-mode="pinned"] .settings-chevron,
  #nav[data-shell-mode="pinned"]:hover .settings-chevron{
    opacity:0!important;
    width:0!important;
    overflow:hidden!important;
    transition:none!important;
  }

  /* Topo e conteúdo nunca reagem ao hover enquanto o menu está fixo. */
  body:has(#nav[data-shell-mode="pinned"]),
  body:has(#nav[data-shell-mode="pinned"]:hover){
    --sidebar-collapsed:var(--shell-sidebar-expanded)!important;
  }
  body:has(#nav[data-shell-mode="pinned"]) header,
  body:has(#nav[data-shell-mode="pinned"]:hover) header{
    margin-left:var(--shell-sidebar-expanded)!important;
    width:calc(100% - var(--shell-sidebar-expanded))!important;
  }
  body:has(#nav[data-shell-mode="pinned"]) main,
  body:has(#nav[data-shell-mode="pinned"]:hover) main{
    margin-left:var(--shell-sidebar-expanded)!important;
    width:calc(100% - var(--shell-sidebar-expanded))!important;
  }
  body:has(#nav[data-shell-mode="pinned"]) .work-gate,
  body:has(#nav[data-shell-mode="pinned"]:hover) .work-gate{
    left:var(--shell-sidebar-expanded)!important;
  }

  /* Efeito de expansão só existe explicitamente no compacto. */
  #nav[data-shell-mode="compact"]:hover,
  #nav[data-shell-mode="compact"].force-open{
    width:var(--shell-sidebar-expanded)!important;
  }
}
