/* Segment 7.6 — reusable module-header boundary */
.module-header{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start;
  gap:14px 20px;
  margin-bottom:14px;
}

.module-header-main{
  min-width:0;
}

.module-header-back{
  margin-bottom:8px;
}

.module-back-button{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:32px;
  padding:6px 9px;
  background:#f8faf8;
}

.module-back-button>span:first-child{
  color:#66756b;
  font-size:13px;
}

.module-header-copy{
  min-width:0;
}

.module-header-copy h1{
  margin-top:5px;
}

.module-header-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:7px;
  flex-wrap:wrap;
  max-width:680px;
}

.module-header-controls{
  grid-column:1/-1;
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  flex-wrap:wrap;
  padding-top:2px;
}

.module-header-controls>.tabs,
.module-header-controls>.seg-tabs{
  margin:0;
}

.module-header-controls>.toolbar{
  width:100%;
  margin:0;
}

@media(max-width:900px){
  .module-header{
    grid-template-columns:1fr;
  }

  .module-header-actions{
    justify-content:flex-start;
    max-width:none;
  }
}

@media(max-width:750px){
  .module-header{
    gap:10px;
  }

  .module-header-copy h1{
    font-size:27px;
  }

  .module-header-actions{
    width:100%;
  }

  .module-header-actions .btn{
    white-space:normal;
  }

  .module-header-controls{
    align-items:stretch;
    flex-direction:column;
  }
}
