/* MDI COMPLETO · cabecera móvil única, fija y sin bloquear el scroll de la página. */
.mobile-tools-toggle{display:none}

@media (max-width:700px){
  :root{--mdi-mobile-header-h:104px}

  body{
    padding-top:var(--mdi-mobile-header-h)!important;
  }

  .topbar{
    position:fixed!important;
    top:0!important;
    left:0!important;
    right:0!important;
    z-index:1000!important;
    width:100%!important;
    height:var(--mdi-mobile-header-h)!important;
    min-height:var(--mdi-mobile-header-h)!important;
    max-height:var(--mdi-mobile-header-h)!important;
    margin:0!important;
    padding:0!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:66px 38px!important;
    gap:0!important;
    background:#fff!important;
    border-bottom:1px solid rgba(23,32,29,.09)!important;
    box-shadow:0 4px 16px rgba(23,32,29,.05)!important;
    backdrop-filter:none!important;
    overflow:visible!important;
  }

  .topbar .brand{
    grid-row:1!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-width:0!important;
    height:66px!important;
    padding:10px 16px 6px!important;
    gap:9px!important;
  }

  .topbar .brand-mark{
    font-size:27px!important;
    line-height:1!important;
    letter-spacing:-.02em!important;
    font-weight:850!important;
  }

  .topbar .brand-copy{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    line-height:1.15!important;
  }

  .topbar .brand-copy strong{
    display:block!important;
    font-size:11px!important;
    font-weight:600!important;
    white-space:nowrap!important;
  }

  .topbar .brand-copy small{display:none!important}

  .mobile-tools-toggle{
    display:inline-flex!important;
    grid-row:2!important;
    justify-self:end!important;
    align-self:center!important;
    align-items:center!important;
    justify-content:center!important;
    margin:0 12px 4px 0!important;
    padding:6px 8px!important;
    border:0!important;
    border-radius:8px!important;
    background:transparent!important;
    color:var(--ink)!important;
    font:inherit!important;
    font-size:11px!important;
    font-weight:750!important;
    line-height:1!important;
    cursor:pointer!important;
  }

  .mobile-tools-toggle::after{
    content:'⌄';
    margin-left:5px;
    font-size:11px;
    line-height:1;
  }

  .mobile-tools-toggle[aria-expanded="true"]::after{content:'⌃'}

  .top-actions{
    display:none!important;
    position:absolute!important;
    top:100%!important;
    right:10px!important;
    width:min(292px,calc(100vw - 20px))!important;
    margin:0!important;
    padding:7px!important;
    flex-direction:column!important;
    gap:0!important;
    border:1px solid rgba(23,32,29,.10)!important;
    border-radius:14px!important;
    background:#fff!important;
    box-shadow:0 18px 44px rgba(23,32,29,.16)!important;
    z-index:1001!important;
  }

  .top-actions.is-open{display:flex!important}

  .top-actions > *{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    min-height:42px!important;
    margin:0!important;
    padding:10px 12px!important;
    align-items:center!important;
    justify-content:flex-start!important;
    border:0!important;
    border-radius:8px!important;
    background:transparent!important;
    box-shadow:none!important;
    color:var(--ink)!important;
    font-size:12px!important;
    font-weight:650!important;
    line-height:1.2!important;
    text-align:left!important;
    text-decoration:none!important;
    white-space:normal!important;
  }

  .top-actions > * + *{
    border-top:1px solid rgba(23,32,29,.08)!important;
  }

  .top-actions > *:hover,
  .top-actions > *:focus-visible{
    background:#f5f7f5!important;
    outline:none!important;
  }

  #mdiSaveOperation.hidden{
    display:flex!important;
    opacity:.40!important;
    pointer-events:none!important;
  }

  .top-actions .mdi-op-count{display:none!important}

  .shell{
    padding-top:14px!important;
  }

  .mdi-stage-map{
    top:calc(var(--mdi-mobile-header-h) + 4px)!important;
  }

  .mdi-stage-anchor,
  #documentsDetails{
    scroll-margin-top:calc(var(--mdi-mobile-header-h) + 10px)!important;
  }
}
